firebug-cvs Mailing List for FireBug: wireless wildfire monitoring (Page 23)
Brought to you by:
doolin
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(36) |
Jun
(45) |
Jul
(108) |
Aug
(31) |
Sep
(2) |
Oct
(4) |
Nov
(113) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(63) |
Feb
(37) |
Mar
(24) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(71) |
Aug
(42) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(64) |
Jun
(71) |
Jul
(51) |
Aug
(89) |
Sep
(24) |
Oct
(1) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
|
Feb
|
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
(21) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: <do...@us...> - 2004-01-21 20:42:38
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/sensirion_sht11 In directory sc8-pr-cvs1:/tmp/cvs-serv8493 Modified Files: SensirionM.nc TempHumM.nc Log Message: Sensirion test code is working. Index: SensirionM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/sensirion_sht11/SensirionM.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** SensirionM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- SensirionM.nc 21 Jan 2004 20:42:35 -0000 1.2 *************** *** 55,59 **** #include "sensirion_sht11.h" #include "SODebug.h" ! #define DBG_USR2 1 enum {START, BUSY, HUMIDITY_DONE}; --- 55,59 ---- #include "sensirion_sht11.h" #include "SODebug.h" ! #define DBG_USR2 0 enum {START, BUSY, HUMIDITY_DONE}; *************** *** 72,76 **** command result_t StdControl.init() { ! init_debug(); call Leds.init(); call TempHumControl.init(); //init Sensirion --- 72,76 ---- command result_t StdControl.init() { ! //init_debug(); call Leds.init(); call TempHumControl.init(); //init Sensirion *************** *** 84,92 **** call TemperatureError.enable(); // " - call Leds.redOn(); - call Leds.yellowOn(); - call Leds.greenOn(); state = START; - //call Timer.start(TIMER_REPEAT, 2000); //start up weather sensor measurements SODbg(DBG_USR2, "SensirionM.StdControl.start()...\n"); --- 84,88 ---- *************** *** 106,113 **** event result_t Timer.fired() { - call Leds.redOff(); - call Leds.yellowOff(); - call Leds.greenOff(); - call TempHumControl.start(); return SUCCESS; --- 102,105 ---- *************** *** 185,190 **** event result_t HumidityError.error(uint8_t token) { - call Leds.redOff(); - call Leds.yellowOff(); call Temperature.getData(); return SUCCESS; --- 177,180 ---- *************** *** 195,199 **** call TempHumControl.stop(); - call Leds.yellowOff(); return SUCCESS; } --- 185,188 ---- *************** *** 241,244 **** --- 230,235 ---- command result_t Sensor.startSampling() { + + call Timer.start(TIMER_REPEAT, 2000); return SUCCESS; } *************** *** 256,260 **** } ! default event result_t Sensor.error(uint16_t) { return SUCCESS; } --- 247,251 ---- } ! async default event result_t Sensor.error(uint16_t) { return SUCCESS; } Index: TempHumM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/sensirion_sht11/TempHumM.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TempHumM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- TempHumM.nc 21 Jan 2004 20:42:35 -0000 1.2 *************** *** 441,445 **** } } ! call Leds.redOn(); atomic { state=TEMP_MEASUREMENT; --- 441,445 ---- } } ! //call Leds.redOn(); atomic { state=TEMP_MEASUREMENT; *************** *** 461,465 **** SODbg(DBG_USR2, "TempHumM.getData: starting to get humidity data \n"); ! call Leds.yellowOn(); atomic { state=HUM_MEASUREMENT; --- 461,465 ---- SODbg(DBG_USR2, "TempHumM.getData: starting to get humidity data \n"); ! //call Leds.yellowOn(); atomic { state=HUM_MEASUREMENT; *************** *** 517,521 **** if (timeout > HUMIDITY_TIMEOUT_TRIES) { ! call Leds.redOff(); // call Leds.yellowOff(); --- 517,521 ---- if (timeout > HUMIDITY_TIMEOUT_TRIES) { ! //call Leds.redOff(); // call Leds.yellowOff(); |
From: <do...@us...> - 2004-01-21 20:42:12
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestSensirion In directory sc8-pr-cvs1:/tmp/cvs-serv8380 Modified Files: Makefile testsensirionM.nc Log Message: Sensirion test code is working. Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestSensirion/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 14 Jan 2004 15:22:54 -0000 1.2 --- Makefile 21 Jan 2004 20:42:06 -0000 1.3 *************** *** 1,4 **** COMPONENT=testsensirion ! SENSORBOARD=sensirion_sht11 include ../Makelocal include $(TOSROOT)/apps/Makerules --- 1,4 ---- COMPONENT=testsensirion ! SENSORBOARD=micawb include ../Makelocal include $(TOSROOT)/apps/Makerules Index: testsensirionM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestSensirion/testsensirionM.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** testsensirionM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- testsensirionM.nc 21 Jan 2004 20:42:06 -0000 1.2 *************** *** 36,39 **** --- 36,41 ---- command result_t StdControl.start() { + + call SHT11.startSampling(); return SUCCESS; } *************** *** 69,73 **** } ! event result_t SHT11.error(uint16_t) { return SUCCESS; } --- 71,75 ---- } ! async event result_t SHT11.error(uint16_t) { return SUCCESS; } |
From: <do...@us...> - 2004-01-21 20:38:50
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv7605 Added Files: HPLUARTC1.nc Log Message: Readding a file. |
From: <do...@us...> - 2004-01-21 20:36:33
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv6938 Modified Files: UART1.nc gps_driverM.nc Log Message: This code currently works for the gps unit by itself. Index: UART1.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/UART1.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UART1.nc 15 Jan 2004 03:22:25 -0000 1.3 --- UART1.nc 21 Jan 2004 20:36:29 -0000 1.4 *************** *** 75,84 **** } implementation { ! //components UARTM, HPLUARTC1; ! components UARTM, HPLUARTC; ByteComm = UARTM; Control = UARTM; ! //UARTM.HPLUART -> HPLUARTC1; ! UARTM.HPLUART -> HPLUARTC; } --- 75,84 ---- } implementation { ! components UARTM, HPLUARTC1; ! //components UARTM, HPLUARTC; ByteComm = UARTM; Control = UARTM; ! UARTM.HPLUART -> HPLUARTC1; ! //UARTM.HPLUART -> HPLUARTC; } Index: gps_driverM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/gps_driverM.nc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gps_driverM.nc 15 Jan 2004 03:22:25 -0000 1.5 --- gps_driverM.nc 21 Jan 2004 20:36:29 -0000 1.6 *************** *** 65,69 **** #include "SODebug.h" ! #define DBG_USR2 1 uint8_t state; --- 65,69 ---- #include "SODebug.h" ! #define DBG_USR2 0 uint8_t state; *************** *** 88,92 **** /** Control.init in GpsPacket.nc */ call GpsControl.init(); ! SODbg(DBG_USR2, "gps_driverM.StdControl.init()\r\n"); return SUCCESS; } --- 88,92 ---- /** Control.init in GpsPacket.nc */ call GpsControl.init(); ! //SODbg(DBG_USR2, "gps_driverM.StdControl.init()\r\n"); return SUCCESS; } *************** *** 94,98 **** command result_t StdControl.start() { ! call Leds.redOn(); /** Control.start in GpsPacket.nc, calls --- 94,98 ---- command result_t StdControl.start() { ! //call Leds.redOn(); /** Control.start in GpsPacket.nc, calls *************** *** 100,104 **** */ call GpsControl.start(); ! SODbg(DBG_USR2, "gps_driverM.StdControl.start()\n"); return SUCCESS; } --- 100,104 ---- */ call GpsControl.start(); ! //SODbg(DBG_USR2, "gps_driverM.StdControl.start()\n"); return SUCCESS; } *************** *** 120,124 **** if (gps_state == GPS_WORKING) { ! SODbg(DBG_USR2, "gps_driverM.readGps(): GPS_WORKING\r\n"); return; } --- 120,124 ---- if (gps_state == GPS_WORKING) { ! //SODbg(DBG_USR2, "gps_driverM.readGps(): GPS_WORKING\r\n"); return; } *************** *** 203,207 **** ! SODbg(DBG_USR2, "LOGGER GPS:\n"); for(j=0; j<11; j++) { UARTPutChar(gga_log_array[j]); --- 203,207 ---- ! //SODbg(DBG_USR2, "LOGGER GPS:\n"); for(j=0; j<11; j++) { UARTPutChar(gga_log_array[j]); *************** *** 224,228 **** UARTPutChar(gps_data->data[i]); } ! SODbg(DBG_USR2, "\r\n"); } --- 224,228 ---- UARTPutChar(gps_data->data[i]); } ! //SODbg(DBG_USR2, "\r\n"); } *************** *** 243,246 **** --- 243,250 ---- GPS_MsgPtr gps_data = (GPS_MsgPtr)data; + + + signal Sensor.dataReady(gps_data); + /* if ((call isGGA(gps_data->data))) { //SODbg(DBG_USR2, "gps_driverM.GpsReceive.receive() GGA Data\r\n"); *************** *** 252,255 **** --- 256,260 ---- } } + */ return data; *************** *** 259,263 **** event result_t GpsSend.sendDone(TOS_MsgPtr msg, result_t success) { ! SODbg(DBG_USR2, "GpsSend.sendDone(): state: %i \r\n", state); return SUCCESS; } --- 264,268 ---- event result_t GpsSend.sendDone(TOS_MsgPtr msg, result_t success) { ! //SODbg(DBG_USR2, "GpsSend.sendDone(): state: %i \r\n", state); return SUCCESS; } *************** *** 267,272 **** //SODbg(DBG_USR2, "gps_new.GpsCmd.SwitchesSet(): PowerState: %i \n\n", PowerState); ! call Leds.yellowOn(); ! call Leds.redOff(); return SUCCESS; } --- 272,277 ---- //SODbg(DBG_USR2, "gps_new.GpsCmd.SwitchesSet(): PowerState: %i \n\n", PowerState); ! //call Leds.yellowOn(); ! //call Leds.redOff(); return SUCCESS; } *************** *** 417,421 **** command result_t Sensor.init() { ! SODbg(DBG_USR2, "gps_driverM.Sensor.init()\n"); return SUCCESS; } --- 422,426 ---- command result_t Sensor.init() { ! //SODbg(DBG_USR2, "gps_driverM.Sensor.init()\n"); return SUCCESS; } *************** *** 423,427 **** command result_t Sensor.powerOn() { ! SODbg(DBG_USR2, "gps_driverM.Sensor.powerOn()\n"); call GpsControl.start(); call readGps(); --- 428,432 ---- command result_t Sensor.powerOn() { ! //SODbg(DBG_USR2, "gps_driverM.Sensor.powerOn()\n"); call GpsControl.start(); call readGps(); *************** *** 438,442 **** if (call GpsCmd.PowerSwitch(GPS_POWER_OFF)) { ! SODbg(DBG_USR2,"gps_driverM.StdControl.stop(): GPS sensor powered off.\n"); gps_state = GPS_FINISHED; } --- 443,447 ---- if (call GpsCmd.PowerSwitch(GPS_POWER_OFF)) { ! //SODbg(DBG_USR2,"gps_driverM.StdControl.stop(): GPS sensor powered off.\n"); gps_state = GPS_FINISHED; } *************** *** 504,508 **** * and signaled. */ ! default event result_t Sensor.error(uint16_t error_code) { return SUCCESS; } --- 509,513 ---- * and signaled. */ ! async default event result_t Sensor.error(uint16_t error_code) { return SUCCESS; } |
From: <do...@us...> - 2004-01-21 20:35:38
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestGPS In directory sc8-pr-cvs1:/tmp/cvs-serv6750 Modified Files: testgpsM.nc Log Message: GPS application currently works, write to uart using debug functions. Index: testgpsM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestGPS/testgpsM.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testgpsM.nc 15 Jan 2004 03:23:15 -0000 1.3 --- testgpsM.nc 21 Jan 2004 20:35:35 -0000 1.4 *************** *** 31,34 **** --- 31,35 ---- command result_t StdControl.init() { + init_debug(); call Leds.init(); *************** *** 75,79 **** ! event result_t LeadTek.error(uint16_t error_code) { return SUCCESS; } --- 76,80 ---- ! async event result_t LeadTek.error(uint16_t error_code) { return SUCCESS; } |
From: <do...@us...> - 2004-01-21 17:39:58
|
Update of /cvsroot/firebug/firebug/web In directory sc8-pr-cvs1:/tmp/cvs-serv27314 Modified Files: blast.html field_deploy.ppt Added Files: steves_talk.ppt Log Message: Start of ppt for Steve. --- NEW FILE: steves_talk.ppt --- (This appears to be a binary file; contents omitted.) Index: blast.html =================================================================== RCS file: /cvsroot/firebug/firebug/web/blast.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blast.html 22 Jul 2003 03:48:50 -0000 1.1 --- blast.html 21 Jan 2004 17:39:54 -0000 1.2 *************** *** 1,16 **** ! <h2>Blast</h2> ! Blast is a routing stack of wireless ad-hoc networks for mote sensing application. ! Sensor readings are collected and encapsulated by the applications, ! blast will establish a self organizing network among the nodes,and route the packet to the basestation. ! All nodes in the network broadcast route messages, so every mode can choose parent node based on the link reliability caculated ! from the information of route messages. ! Once the network is established, each node can either sends its own packets or forwards its children's packets to its parent node. ! Packets can be forwarded to the base station in a multihop fashion.With this scheme, blast win the 90%+ receive rate of data packet ! in ideal environment. ! The two drawbacks of current version of blast are : The network setup time is relatively long, it is because it needs to collect enough ! route packet to caculate the reliability, another is it needs a mechanism to operate in power_saved mode to extend the longevity ! of the motes. \ No newline at end of file --- 1,112 ---- + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> ! <html xmlns="http://www.w3.org/1999/xhtml"> ! <head> ! <title> ! BLAST multihop routing ! </title> ! <link rel="SHORTCUT ICON" href="./images/favicon.ico"> ! <link type="text/css" rel="stylesheet" href="firebug.css"> ! <meta name="author" content="David M. Doolin, UC Berkeley" /> ! </head> ! <body> ! <h1>BLAST multihop routing</h1> ! ! ! ! <p>Blast is a routing stack of wireless ad-hoc networks. ! Sensor readings are collected and encapsulated by the applications, ! and blast will establish a self organizing network among the ! nodes, routing the packet to the basestation. ! </p> ! ! <p> ! All nodes in the network broadcast route messages, so ! every mode can choose a parent node based on the link ! reliability caculated from the information of route messages. ! Once the network is established, each node can either ! sends its own packets or forwards child packets ! to its parent node. Packets can be forwarded to the base ! station in a multihop fashion. ! </p> ! ! ! <h2>BLAST performance</h2> ! <p> ! With this scheme, blast ! win the 90%+ receive rate of data packet in ideal environment. ! </p> ! ! ! <h2>BLAST limitations</h2> ! ! <p> ! Two drawbacks of current version of BLAST are: ! </p> ! ! ! <ol> ! <li> ! The network setup time is relatively long, it is ! because it needs to collect enough ! route packet to caculate the reliability. ! </li> ! <li> ! BLAST needs a mechanism to operate in ! power_saved mode to extend the longevity ! of the motes. ! </li> ! </ol> ! ! ! ! <h1>Experience with BLAST in the field</h1> ! ! <p> ! Our experience with BLAST has been a qualified success: ! the protocol appears to work as advertised. However, ! the following suggestions would help improve understanding ! and using the component in applications. ! </p> ! ! ! <ol> ! <li>Having an interface to set the RF transmitting power ! would be very helpful. The current BLAST code encapsulates ! the radio, which is good, but changing power settings ! requires changing constants in the CC1000 header file, ! or fiddling with BLAST or tos system code to do the same. ! None of these solutions are maintainable because ! different people on the same project may set the ! parameters differently, and tampering with any code in ! a system source tree renders could have side effects ! with other applications using the same components. ! </li> ! ! <li> ! BLAST has several tunable parameters to adjust ! stability, agility, etc., but it appears that ! adjusting tuning parameters requires changing ! BLAST source code. Having these parameters available ! for the programmer would be helpful. ! </li> ! ! <li> ! Documentation is scattered around several web sites. ! It would be really helpful to have some canonical ! documentation included with the source code package. ! </li> ! </ol> ! ! <hr /> ! ! <p> ! Last updated: $Date$ by $Author$. ! </p> ! ! </body> ! </html> Index: field_deploy.ppt =================================================================== RCS file: /cvsroot/firebug/firebug/web/field_deploy.ppt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs3K5ire and /tmp/cvsyvqZ9t differ |
From: <ash...@us...> - 2004-01-20 21:17:27
|
Update of /cvsroot/firebug/fireboard/fireboard/apps In directory sc8-pr-cvs1:/tmp/cvs-serv4118 Modified Files: Makelocal Log Message: Index: Makelocal =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/Makelocal,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makelocal 14 Jan 2004 15:22:54 -0000 1.3 --- Makelocal 20 Jan 2004 21:17:24 -0000 1.4 *************** *** 1,5 **** - MTS420CA = $(HOME)/sf.net/firebug/fireboard/fireboard LOCAL_PATH += -I$(MTS420CA)/sensors/$(SENSORBOARD) --- 1,10 ---- + #declare it locally + #MTS420CA = $(HOME)/sf.net/firebug/fireboard/fireboard + + ifndef MTS420CA + $(error Environment variable 'MTS420CA' not declared) + endif LOCAL_PATH += -I$(MTS420CA)/sensors/$(SENSORBOARD) *************** *** 18,21 **** --- 23,32 ---- #LOCAL_PATH += -I$(MTS420CA)/apps/TestFireBoardData + + #make sure tree outside can find BLAST + ifndef BLASTROOT + $(error Environment variable 'BLASTROOT' not declared) + endif + ROUTE_PATH += -I$(BLASTROOT)/Sender \ -I$(BLASTROOT)/Interface \ |
From: <do...@us...> - 2004-01-16 16:18:35
|
Update of /cvsroot/firebug/firebug/web/fireboard In directory sc8-pr-cvs1:/tmp/cvs-serv6473/fireboard Log Message: Directory /cvsroot/firebug/firebug/web/fireboard added to the repository |
From: <do...@us...> - 2004-01-15 03:23:18
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestGPS In directory sc8-pr-cvs1:/tmp/cvs-serv13751 Modified Files: testgpsM.nc Log Message: GPS application now waits until it has a fix before signaling a dataReady event. Index: testgpsM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestGPS/testgpsM.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** testgpsM.nc 14 Jan 2004 15:22:54 -0000 1.2 --- testgpsM.nc 15 Jan 2004 03:23:15 -0000 1.3 *************** *** 39,42 **** --- 39,44 ---- call LeadTek.powerOn(); + // Loading programs doesn't work yet. + //call LeadTek.loadProgram((void*)gps_syncmode_off); return SUCCESS; } *************** *** 60,75 **** GPS_Msg * gps_data = (GPS_Msg*)userdata; ! for (i=0; i<=gps_data->data[0]; i++) { ! /** UARTPutChar is an SODebug function. ! * FIXME: Change this to use a char[]. ! */ UARTPutChar(gps_data->data[i]); } ! SODbg(DBG_USR2, "\n"); call Leds.greenToggle(); - //SODbg(DBG_USR2, "testgpsM.LeadTek.dataReady()...\n"); - //call LeadTek.powerOff(); --- 62,72 ---- GPS_Msg * gps_data = (GPS_Msg*)userdata; ! for (i=0; i<=gps_data->length; i++) { UARTPutChar(gps_data->data[i]); } ! SODbg(DBG_USR2, "\r\n"); call Leds.greenToggle(); //call LeadTek.powerOff(); |
From: <do...@us...> - 2004-01-15 03:22:28
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv13615 Modified Files: UART1.nc gps_driverM.nc leadtek_9546.h Removed Files: GpsC.nc HPLUARTC1.nc Log Message: Removed files containing code that was not used. Index: UART1.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/UART1.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UART1.nc 14 Jan 2004 16:59:16 -0000 1.2 --- UART1.nc 15 Jan 2004 03:22:25 -0000 1.3 *************** *** 75,82 **** } implementation { ! components UARTM, HPLUARTC1; ByteComm = UARTM; Control = UARTM; ! UARTM.HPLUART -> HPLUARTC1; } --- 75,84 ---- } implementation { ! //components UARTM, HPLUARTC1; ! components UARTM, HPLUARTC; ByteComm = UARTM; Control = UARTM; ! //UARTM.HPLUART -> HPLUARTC1; ! UARTM.HPLUART -> HPLUARTC; } Index: gps_driverM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/gps_driverM.nc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gps_driverM.nc 14 Jan 2004 14:54:39 -0000 1.4 --- gps_driverM.nc 15 Jan 2004 03:22:25 -0000 1.5 *************** *** 22,26 **** command void readGps(); ! command void stopGps(); command uint8_t extract_hours(char * data); --- 22,26 ---- command void readGps(); ! command uint8_t extract_hours(char * data); *************** *** 32,40 **** command uint16_t extract_Long_dec_min(char * data); command uint8_t extract_NSEWind(char * data); command result_t isGGA(uint8_t * data); - command result_t parseGGA(int8_t gga_string[GPS_MSG_LENGTH], uint8_t length); - command result_t logGPS(char gga_fields[GPS_FIELDS][GPS_CHAR_PER_FIELD]); command result_t log_gga_data_to_eeprom(GGA_Msg * pGGA); --- 32,45 ---- command uint16_t extract_Long_dec_min(char * data); command uint8_t extract_NSEWind(char * data); + command uint8_t extract_num_sats(char * data); command result_t isGGA(uint8_t * data); + command result_t parse_gga(GPS_Msg * gps_data); + command uint8_t get_gps_fix(char * data); + + command void spew_to_uart(GPS_Msg * gps_data); + + command result_t load_gga_struct(char gga_fields[GGA_FIELDS][GPS_CHAR_PER_FIELD]); command result_t log_gga_data_to_eeprom(GGA_Msg * pGGA); *************** *** 62,69 **** #define DBG_USR2 1 ! char state; ! char gps_state; ! GGA_Msg gga_msg; enum {IDLE, BUSY, BUSY_0, BUSY_1, GET_SAMPLE_0, GET_SAMPLE_1, --- 67,80 ---- #define DBG_USR2 1 ! uint8_t state; ! uint8_t gps_state; ! GGA_Msg gga_msg = {0}; ! ! /** This is essentially thread safe, because once it is ! * set, it will only reset to 0. Read the NMEA specs ! * to determine the values. ! */ ! norace uint8_t gps_fix = 0; enum {IDLE, BUSY, BUSY_0, BUSY_1, GET_SAMPLE_0, GET_SAMPLE_1, *************** *** 77,81 **** /** Control.init in GpsPacket.nc */ call GpsControl.init(); ! SODbg(DBG_USR2, "gps_driverM.StdControl.init()\n"); return SUCCESS; } --- 88,92 ---- /** Control.init in GpsPacket.nc */ call GpsControl.init(); ! SODbg(DBG_USR2, "gps_driverM.StdControl.init()\r\n"); return SUCCESS; } *************** *** 99,119 **** - command void stopGps() { - - if (call GpsCmd.PowerSwitch(GPS_POWER_OFF)) { - - SODbg(DBG_USR2,"gps_driverM.StdControl.stop(): GPS sensor powered off.\n"); - gps_state = GPS_FINISHED; - } - } - /** Ok, this function turns on the gps unit for reading, * which is turned of elsewhere when the read is finished. * If the read isn't finished, the function exits. */ command void readGps() { if (gps_state == GPS_WORKING) { ! SODbg(DBG_USR2, "gps_driverM.readGps(): GPS_WORKING\n"); return; } --- 110,124 ---- /** Ok, this function turns on the gps unit for reading, * which is turned of elsewhere when the read is finished. * If the read isn't finished, the function exits. + * + * FIXME: Get rid of this function, move the code into the + * appropriate Sensor interface function. */ command void readGps() { if (gps_state == GPS_WORKING) { ! SODbg(DBG_USR2, "gps_driverM.readGps(): GPS_WORKING\r\n"); return; } *************** *** 121,129 **** /* Implementation is in GpsPacket.nc */ if (call GpsCmd.PowerSwitch(GPS_POWER_ON)) { ! SODbg(DBG_USR2, "gps_driverM.readGps(): GPS powered on\n"); gps_state = GPS_WORKING; } } event result_t PowerSwitch.getDone(char value) { return SUCCESS; --- 126,135 ---- /* Implementation is in GpsPacket.nc */ if (call GpsCmd.PowerSwitch(GPS_POWER_ON)) { ! SODbg(DBG_USR2, "gps_driverM.readGps(): GPS powered on\r\n"); gps_state = GPS_WORKING; } } + event result_t PowerSwitch.getDone(char value) { return SUCCESS; *************** *** 131,134 **** --- 137,142 ---- event result_t PowerSwitch.setDone(bool local_result) { + SODbg(DBG_USR2,"gps_driverM.PowerSwitch.setDone()\r\n"); + //gps_state = GPS_FINISHED; return SUCCESS; } *************** *** 139,143 **** - event result_t IOSwitch.getDone(char value) { return SUCCESS; --- 147,150 ---- *************** *** 170,174 **** (data[4] == 'M') && (data[5] == 'C')) { ! return TRUE; } else { --- 177,181 ---- (data[4] == 'M') && (data[5] == 'C')) { ! return FALSE; } else { *************** *** 208,265 **** ! command result_t logGPS(char gga_fields[GPS_FIELDS][GPS_CHAR_PER_FIELD]) { ! ! ! char NS; ! char EW; ! //uint8_t j; ! uint8_t nos; // number of satellites ! ! //gga_msg.hours = 10*(gga_fields[1][0]-'0') + (gga_fields[1][1]-'0'); ! gga_msg.hours = call extract_hours(gga_fields[1]); ! ! //gga_msg.minutes = 10*(gga_fields[1][2]-'0') + (gga_fields[1][3]-'0'); ! gga_msg.minutes = call extract_minutes(gga_fields[1]); ! ! //gga_msg.dec_sec = 10000*(gga_fields[1][4]-'0') + 1000*(gga_fields[1][5]-'0') ! // + 100*(gga_fields[1][7]-'0') + 10*(gga_fields[1][8]-'0') ! // + (gga_fields[1][9]-'0'); ! gga_msg.dec_sec = call extract_dec_sec(gga_fields[1]); ! ! ! gga_msg.Lat_deg = 10*(gga_fields[2][0]-'0') + (gga_fields[2][1]-'0'); ! ! gga_msg.Lat_dec_min = 100000*(gga_fields[2][2]-'0') + 10000*(gga_fields[2][3]-'0') ! + 1000*(gga_fields[2][4]-'0') + 100*(gga_fields[2][5]-'0') ! + 10*(gga_fields[2][6]-'0') + (gga_fields[2][7]-'0'); ! ! ! gga_msg.Long_deg = 100*(gga_fields[4][0]-'0') + 10*(gga_fields[4][1]-'0') ! + (gga_fields[4][2]-'0'); ! ! gga_msg.Long_dec_min = 100000*(gga_fields[4][3]-'0') + 10000*(gga_fields[4][4]-'0') ! + 1000*(gga_fields[4][5]-'0') + 100*(gga_fields[4][6]-'0') ! + 10*(gga_fields[4][7]-'0') + (gga_fields[4][8]-'0'); ! ! NS = (gga_fields[3][0] == 'N') ? 1 : 0; ! EW = (gga_fields[5][0] == 'W') ? 1 : 0; ! gga_msg.NSEWind = EW | (NS<<4); // eg. Status = 000N000E = 00010000 ! ! ! nos = 10*(gga_fields[7][0]-'0') + (gga_fields[7][1]-'0'); ! ! ! return SUCCESS; ! } ! ! ! ! /////////// Make this into a function for spewing data ! ///// out of the UART. ! #if 0 ! command void spewUART(uint8_t data) { ! int i; ! for (i=0; i<=gps_data->data[0]; i++) { /** UARTPutChar is an SODebug function. * FIXME: Change this to use a char[]. --- 215,222 ---- ! command void spew_to_uart(GPS_Msg * gps_data) { ! int i; ! for (i=0; i<=gps_data->length; i++) { /** UARTPutChar is an SODebug function. * FIXME: Change this to use a char[]. *************** *** 267,273 **** UARTPutChar(gps_data->data[i]); } ! SODbg(DBG_USR2, "\n"); ! } ! #endif --- 224,230 ---- UARTPutChar(gps_data->data[i]); } ! SODbg(DBG_USR2, "\r\n"); ! } ! *************** *** 284,372 **** event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) { - //uint8_t i; GPS_MsgPtr gps_data = (GPS_MsgPtr)data; - /** Save these for now. */ - //int8_t gga_string[GPS_MSG_LENGTH]; - //bool gga_read = FALSE; - //bool gga_read_done = FALSE; - - call Leds.greenToggle(); - - signal Sensor.dataReady((void*)gps_data); - - return data; - - //Don't worry about this for now. if ((call isGGA(gps_data->data))) { ! SODbg(DBG_USR2, "gps_driverM.GpsReceive.receive() GGA Data\n"); ! signal Sensor.dataReady(gps_data); ! signal Sensor.dataReady((void*)gps_gga_mask); } - - #if 0 - uint8_t j = 0; - gga_read = TRUE; - gga_read_done = FALSE; ! while (!gga_read_done) { ! if(gps_data->data[i] == GPS_END_MSG) { ! if(gga_read) { - call stopGps(); - call parseGGA(gga_string, j); - gga_read = FALSE; - gga_read_done = TRUE; - } - } ! if(gga_read) { ! gga_string[j] = gps_data->data[i]; ! j++; ! } ! i++; ! } - } ! signal Sensor.dataReady(gps_data); ! #endif ! return data; } ! event result_t GpsSend.sendDone(TOS_MsgPtr msg, result_t success) { ! SODbg(DBG_USR2, "GpsSend.sendDone(): state: %i \n", state); ! return SUCCESS; ! } ! event result_t GpsCmd.SwitchesSet(uint8_t PowerState) { ! //SODbg(DBG_USR2, "gps_new.GpsCmd.SwitchesSet(): PowerState: %i \n\n", PowerState); ! call Leds.yellowOn(); ! call Leds.redOff(); return SUCCESS; } ! //**************** ! //*Parse GPS Data*http://www.ce.berkeley.edu/~mchen/ ! //**************** ! //* ! //* Fields are comma delimited ! //* NMEA string parsed by field and stored into ! //* gga_fields array ! ! ! command result_t parseGGA(int8_t gga_string[GPS_MSG_LENGTH], uint8_t length) { ! char gga_fields[GPS_FIELDS][GPS_CHAR_PER_FIELD]; // = {{0}}; bool end_of_field = FALSE; --- 241,318 ---- event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) { GPS_MsgPtr gps_data = (GPS_MsgPtr)data; if ((call isGGA(gps_data->data))) { ! //SODbg(DBG_USR2, "gps_driverM.GpsReceive.receive() GGA Data\r\n"); ! call parse_gga(gps_data); ! ! if (gps_fix) { ! signal Sensor.dataReady(gps_data); ! call Sensor.powerOff(); ! } } + return data; + } ! event result_t GpsSend.sendDone(TOS_MsgPtr msg, result_t success) { ! SODbg(DBG_USR2, "GpsSend.sendDone(): state: %i \r\n", state); ! return SUCCESS; ! } ! event result_t GpsCmd.SwitchesSet(uint8_t PowerState) { ! //SODbg(DBG_USR2, "gps_new.GpsCmd.SwitchesSet(): PowerState: %i \n\n", PowerState); ! call Leds.yellowOn(); ! call Leds.redOff(); ! return SUCCESS; ! } ! /** FIXME: Change this to count commas on the raw gga string. ! * Counting commas will save a lot of processing power otherwise ! * used for building char[][]s. ! */ ! command uint8_t get_gps_fix(char * data) { ! return (data[0] - '0'); } ! command result_t load_gga_struct(char gga_fields[GGA_FIELDS][GPS_CHAR_PER_FIELD]) { ! char NS; ! char EW; ! gga_msg.hours = call extract_hours(gga_fields[1]); ! gga_msg.minutes = call extract_minutes(gga_fields[1]); ! gga_msg.dec_sec = call extract_dec_sec(gga_fields[1]); ! gga_msg.Lat_deg = call extract_Lat_deg(gga_fields[2]); ! gga_msg.Lat_dec_min = call extract_Lat_dec_min(gga_fields[2]); ! gga_msg.Long_deg = call extract_Long_deg(gga_fields[4]); ! gga_msg.Long_dec_min = call extract_Long_dec_min(gga_fields[4]); ! NS = (gga_fields[3][0] == 'N') ? 1 : 0; ! EW = (gga_fields[5][0] == 'W') ? 1 : 0; ! gga_msg.NSEWind = EW | (NS<<4); // eg. Status = 000N000E = 00010000 ! gga_msg.num_sats = call extract_num_sats(gga_fields[7]); ! return SUCCESS; } ! /** The internal logic of this command is inherited from ! * whoknowswhere. It's too complicated for it's doing. ! * FIXME: Simplify the code in this command. ! */ ! command result_t parse_gga(GPS_Msg * gps_data) { ! //SODbg(DBG_USR2, "gps_new.GpsCmd.SwitchesSet(): PowerState: %i \n\n", PowerState); ! ! char gga_fields[GGA_FIELDS][GPS_CHAR_PER_FIELD]; // = {{0}}; bool end_of_field = FALSE; *************** *** 374,391 **** uint8_t j,m; uint16_t k=0; ! ! //***DEBUG: Output NMEA message*** ! uint16_t q; ! SODbg(DBG_USR2, "fireboardM.parseGGA(): \n"); ! for(q=0; q<length; q++) UARTPutChar(gga_string[q]); ! SODbg(DBG_USR2, "\n"); ! //******************************** ! ! ! // Just get out of this function for now. ! return SUCCESS; // Parse and store comma delimited fields into EEPROM ! while (i < GPS_FIELDS) { // assemble gga_fields array --- 320,327 ---- uint8_t j,m; uint16_t k=0; ! uint8_t length = gps_data->length; // Parse and store comma delimited fields into EEPROM ! while (i < GGA_FIELDS) { // assemble gga_fields array *************** *** 393,401 **** j = 0; while (!end_of_field & k < length) { ! if (gga_string[k] == GPS_DELIMITER) { end_of_field = TRUE; } else { ! gga_fields[i][j] = gga_string[k]; } j++; --- 329,337 ---- j = 0; while (!end_of_field & k < length) { ! if (gps_data->data[k] == GPS_DELIMITER) { end_of_field = TRUE; } else { ! gga_fields[i][j] = gps_data->data[k]; } j++; *************** *** 412,421 **** } ! call logGPS(gga_fields); ! return SUCCESS; } - command uint8_t extract_hours(char * data) { return (10*(data[0]-'0') + (data[1]-'0')); --- 348,361 ---- } ! // Finding the gps fix should probably done somewhere else. ! gps_fix = call get_gps_fix(gga_fields[6]); ! //SODbg(DBG_USR2, "gps_new.parse_gga(): gps_fix %i \r\n", gps_fix); ! ! //call load_gga_struct(gga_fields); ! ! return SUCCESS; } command uint8_t extract_hours(char * data) { return (10*(data[0]-'0') + (data[1]-'0')); *************** *** 439,455 **** command uint8_t extract_Lat_deg(char * data) { ! return 0; } command uint16_t extract_Lat_dec_min(char * data) { ! return 0; } command uint8_t extract_Long_deg(char * data) { ! return 0; } command uint16_t extract_Long_dec_min(char * data) { ! return 0; } --- 379,406 ---- command uint8_t extract_Lat_deg(char * data) { ! return 10*(data[0]-'0') + (data[1]-'0'); } command uint16_t extract_Lat_dec_min(char * data) { ! ! uint16_t dec_min; ! dec_min = 100000*(data[2]-'0') + 10000*(data[3]-'0') ! + 1000*(data[4]-'0') + 100*(data[5]-'0') ! + 10*(data[6]-'0') + (data[7]-'0'); ! return dec_min; } command uint8_t extract_Long_deg(char * data) { ! return (100*(data[0]-'0') + 10*(data[1]-'0') ! + (data[2]-'0')); } command uint16_t extract_Long_dec_min(char * data) { ! ! uint16_t dec_min; ! dec_min = 100000*(data[3]-'0') + 10000*(data[4]-'0') ! + 1000*(data[5]-'0') + 100*(data[6]-'0') ! + 10*(data[7]-'0') + (data[8]-'0'); ! return dec_min; } *************** *** 458,463 **** } ! ! --- 409,415 ---- } ! command uint8_t extract_num_sats(char * data) { ! return (10*(data[0]-'0') + (data[1]-'0')); ! } *************** *** 483,487 **** command result_t Sensor.powerOff() { ! call stopGps(); signal Sensor.powerOffDone(); return SUCCESS; --- 435,445 ---- command result_t Sensor.powerOff() { ! //call stopGps(); ! if (call GpsCmd.PowerSwitch(GPS_POWER_OFF)) { ! ! SODbg(DBG_USR2,"gps_driverM.StdControl.stop(): GPS sensor powered off.\n"); ! gps_state = GPS_FINISHED; ! } ! gps_fix = 0; signal Sensor.powerOffDone(); return SUCCESS; *************** *** 492,498 **** --- 450,463 ---- } + /** This will need to call Sensor.loadProgram with an appropriate + * NMEA string. + */ command result_t Sensor.setSamplingInterval(uint16_t sampling_rate) { return SUCCESS; } + + /** This will need to call Sensor.loadProgram with an appropriate + * NMEA string. + */ command result_t Sensor.getSamplingInterval(uint16_t sampling_rate) { return SUCCESS; *************** *** 515,522 **** --- 480,507 ---- } + + /** Not currently working for at least 2 reasons: + * 1. Not sure if the program string is correct for + * the LeadTek; + * 2. Not sure if any program string is correctly navigating + * the UART and loading into the LeadTek. + */ command result_t Sensor.loadProgram(uint8_t * program) { + + TOS_MsgPtr msg = {0}; + strcpy(msg->data,program); + signal Sensor.dataReady((void*)program); + + call GpsSend.send(msg); + return SUCCESS; } + /** In many cases we might want the GPS unit to be silent + * until a valid fix is obtained, report the fix, + * then shut up. Not being able to obtain a valid fix + * in some amount of time can be regarded as an error + * and signaled. + */ default event result_t Sensor.error(uint16_t error_code) { return SUCCESS; Index: leadtek_9546.h =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/leadtek_9546.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** leadtek_9546.h 14 Jan 2004 17:20:28 -0000 1.1 --- leadtek_9546.h 15 Jan 2004 03:22:25 -0000 1.2 *************** *** 86,90 **** #define GPS_MSG_LENGTH 100 #define GPS_CHAR 11 ! #define GPS_FIELDS 8 #define GPS_CHAR_PER_FIELD 10 #define GPS_DELIMITER ',' --- 86,90 ---- #define GPS_MSG_LENGTH 100 #define GPS_CHAR 11 ! #define GGA_FIELDS 8 #define GPS_CHAR_PER_FIELD 10 #define GPS_DELIMITER ',' *************** *** 123,130 **** * of the GPS unit. These are all in NMEA format. */ ! const uint8_t gps_gga_mask[] = {"$PFST,NMEA," NMEA_GGA_MASK NMEA_END1 NMEA_END2}; ! const uint8_t gps_rmc_mask[] = {"$PFST,NMEA," NMEA_RMC_MASK NMEA_END1 NMEA_END2}; ! const uint8_t gps_syncmode_on[] = {"$PFST,SYNCMODE,1" NMEA_END1 NMEA_END2}; ! const uint8_t gps_syncmode_off[] = {"$PFST,SYNCMODE,0" NMEA_END1 NMEA_END2}; --- 123,130 ---- * of the GPS unit. These are all in NMEA format. */ ! //const uint8_t gps_gga_mask[] = {"$PLTC,NMEA," NMEA_GGA_MASK NMEA_END1 NMEA_END2}; ! //const uint8_t gps_rmc_mask[] = {"$PLTC,NMEA," NMEA_RMC_MASK NMEA_END1 NMEA_END2}; ! //const uint8_t gps_syncmode_on[] = {"$PLTC,SYNCMODE,1" NMEA_END1 NMEA_END2}; ! const uint8_t gps_syncmode_off[] = {"$LTC,SYNCMODE,0" NMEA_END1 NMEA_END2}; *************** *** 153,157 **** uint8_t Long_deg; uint16_t Long_dec_min; ! uint8_t NSEWind; }; --- 153,158 ---- uint8_t Long_deg; uint16_t Long_dec_min; ! uint8_t NSEWind; ! uint8_t num_sats; }; --- GpsC.nc DELETED --- --- HPLUARTC1.nc DELETED --- |
From: <do...@us...> - 2004-01-14 17:20:31
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv18035/sensors/leadtek9546 Modified Files: GpsPacket.nc gps_driver.nc Added Files: leadtek_9546.h Removed Files: gps.h Log Message: Moved gps.h to leadtek_9546.h to reflect design changes in sensor drivers. --- NEW FILE: leadtek_9546.h --- /* tab:4 * * * "Copyright (c) 2000-2002 The Regents of the University of California. * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice, the following * two paragraphs and the author appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * */ /* tab:4 * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By * downloading, copying, installing or using the software you agree to * this license. If you do not agree to this license, do not download, * install, copy or use the software. * * Intel Open Source License * * Copyright (c) 2002 Intel Corporation * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * */ /* * * Authors: * * $Id: leadtek_9546.h,v 1.1 2004/01/14 17:20:28 doolin Exp $ */ /** * Parts of this code were written or modified for FireBug project * funded by the NSF Information Technology Research * initiative. Copyright Regents of the University of * of California, 2003. * * @url http://firebug.sourceforge.net * * @author David. M. Doolin */ #ifndef GPS_H #define GPS_H // The actual values for each of these may vary, // especially characters per field, which may be // application dependent. #define GPS_MSG_LENGTH 100 #define GPS_CHAR 11 #define GPS_FIELDS 8 #define GPS_CHAR_PER_FIELD 10 #define GPS_DELIMITER ',' #define GPS_END_MSG '*' #define GPS_DATA_LENGTH 128 #define GPS_PACKET_START 0x24 //start of gps packet #define GPS_PACKET_END1 0x0D //penultimate byte of NMEA string #define GPS_PACKET_END2 0x0A //ultimate byte of NMEA string // Carriage return, ASCII 13 #define NMEA_END1 "\r" //0x0D //penultimate byte of NMEA string // Line feed, ASCII 10 #define NMEA_END2 "\n" //0x0A //ultimate byte of NMEA string #define NMEA_GSV_MASK 0x0001 #define NMEA_GSA_MASK 0x0002 #define NMEA_ZDA_MASK 0x0004 #define NMEA_PPS_MASK 0x0010 #define NMEA_FOM_MASK 0x0020 #define NMEA_GLL_MASK 0x1000 #define NMEA_GGA_MASK "0x2000" #define NMEA_VTG_MASK "0x4000" #define NMEA_RMC_MASK "0x8000" // This isn't used yet, but should be. #define GPS_POWER_OFF 0 #define GPS_POWER_ON 1 const uint8_t gps_power_on = 0; /** * Predefined "programs" useful for setting various states * of the GPS unit. These are all in NMEA format. */ const uint8_t gps_gga_mask[] = {"$PFST,NMEA," NMEA_GGA_MASK NMEA_END1 NMEA_END2}; const uint8_t gps_rmc_mask[] = {"$PFST,NMEA," NMEA_RMC_MASK NMEA_END1 NMEA_END2}; const uint8_t gps_syncmode_on[] = {"$PFST,SYNCMODE,1" NMEA_END1 NMEA_END2}; const uint8_t gps_syncmode_off[] = {"$PFST,SYNCMODE,0" NMEA_END1 NMEA_END2}; typedef struct _gga_msg GGA_Msg; typedef struct _gps_msg GPS_Msg; typedef GPS_Msg * GPS_MsgPtr; struct _gps_msg { /* The following fields are received on the gps. */ uint8_t length; int8_t data[GPS_DATA_LENGTH]; uint16_t crc; }; struct _gga_msg { uint8_t hours; uint8_t minutes; uint16_t dec_sec; uint8_t Lat_deg; uint16_t Lat_dec_min; uint8_t Long_deg; uint16_t Long_dec_min; uint8_t NSEWind; }; #endif Index: GpsPacket.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/GpsPacket.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** GpsPacket.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- GpsPacket.nc 14 Jan 2004 17:20:28 -0000 1.2 *************** *** 115,122 **** implementation { - - #include "gps.h" - - enum {GPS_SWITCH_IDLE, //GPS I2C switches are not using the I2C bus GPS_PWR_SWITCH_WAIT, //Waiting for GPS I2C power switch to set --- 115,118 ---- Index: gps_driver.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/gps_driver.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gps_driver.nc 14 Jan 2004 14:05:34 -0000 1.3 --- gps_driver.nc 14 Jan 2004 17:20:28 -0000 1.4 *************** *** 37,41 **** includes sensorboard; ! includes gps; configuration gps_driver { --- 37,41 ---- includes sensorboard; ! includes leadtek_9546; configuration gps_driver { --- gps.h DELETED --- |
From: <do...@us...> - 2004-01-14 17:20:31
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestGPS In directory sc8-pr-cvs1:/tmp/cvs-serv18035/apps/TestGPS Modified Files: testgps.nc Log Message: Moved gps.h to leadtek_9546.h to reflect design changes in sensor drivers. Index: testgps.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestGPS/testgps.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** testgps.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- testgps.nc 14 Jan 2004 17:20:28 -0000 1.2 *************** *** 12,16 **** includes sensorboard; includes fireboard; ! includes gps; configuration testgps { --- 12,16 ---- includes sensorboard; includes fireboard; ! includes leadtek_9546; configuration testgps { |
From: <do...@us...> - 2004-01-14 16:59:19
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv12929 Modified Files: UART1.nc Removed Files: GpsCmd.nc Log Message: Removed unused interface GpsCmd.nc. Index: UART1.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/UART1.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** UART1.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- UART1.nc 14 Jan 2004 16:59:16 -0000 1.2 *************** *** 1,2 **** --- 1,4 ---- + /* -*- Mode: C; c-basic-indent: 3; indent-tabs-mode: nil -*- */ + /* tab:4 * --- GpsCmd.nc DELETED --- |
From: <do...@us...> - 2004-01-14 16:39:35
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/adg715 In directory sc8-pr-cvs1:/tmp/cvs-serv8441 Modified Files: HPLI2CM.nc MicaWbSwitchM.nc Removed Files: SODebug.h wbswitch_debug.h Log Message: Removing extra header files. Index: HPLI2CM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/adg715/HPLI2CM.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HPLI2CM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- HPLI2CM.nc 14 Jan 2004 16:39:32 -0000 1.2 *************** *** 242,246 **** break; case TWS_MR_SLA_NACK: ! signal I2C.writeDone(FALSE); break; case TWS_MR_DATA_ACK: --- 242,246 ---- break; case TWS_MR_SLA_NACK: ! signal I2C.writeDone(FALSE); break; case TWS_MR_DATA_ACK: Index: MicaWbSwitchM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/adg715/MicaWbSwitchM.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MicaWbSwitchM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- MicaWbSwitchM.nc 14 Jan 2004 16:39:32 -0000 1.2 *************** *** 88,93 **** implementation { - #define WB_DEBUG 0 - #include "wbswitch_debug.h" enum { GET_SWITCH = 0, --- 88,91 ---- *************** *** 106,110 **** state = IDLE; ! WBDbg(DBG_USR2, "MicaWBSwitch.StdControl.init() state: %i\n,",state); return call I2CPacketControl.init(); } --- 104,108 ---- state = IDLE; ! //WBDbg(DBG_USR2, "MicaWBSwitch.StdControl.init() state: %i\n,",state); return call I2CPacketControl.init(); } *************** *** 113,117 **** command result_t StdControl.start() { ! WBDbg(DBG_USR2, "MicaWBSwitch.StdControl.start() state: %i\n",state); return call I2CPacketControl.start(); } --- 111,115 ---- command result_t StdControl.start() { ! //WBDbg(DBG_USR2, "MicaWBSwitch.StdControl.start() state: %i\n",state); return call I2CPacketControl.start(); } *************** *** 120,124 **** command result_t StdControl.stop() { ! WBDbg(DBG_USR2, "MicaWBSwitch.StdControl.stop() state: %i\n",state); return call I2CPacketControl.stop(); } --- 118,122 ---- command result_t StdControl.stop() { ! //WBDbg(DBG_USR2, "MicaWBSwitch.StdControl.stop() state: %i\n",state); return call I2CPacketControl.stop(); } *************** *** 127,136 **** command result_t Switch.get[uint8_t id]() { ! WBDbg(DBG_USR2, "MicaWBSwitch.Switch.get() state: %i\n",state); if (state == IDLE) { state = GET_SWITCH; ! WBDbg(DBG_USR2, "MicaWBSwitch.Switch.get() state: %i\n",state); if (id == 0) --- 125,134 ---- command result_t Switch.get[uint8_t id]() { ! //WBDbg(DBG_USR2, "MicaWBSwitch.Switch.get() state: %i\n",state); if (state == IDLE) { state = GET_SWITCH; ! //WBDbg(DBG_USR2, "MicaWBSwitch.Switch.get() state: %i\n",state); if (id == 0) *************** *** 146,150 **** command result_t Switch.set[uint8_t id](char l_position, char l_value) { ! WBDbg(DBG_USR2, "MicaWBSwitch.Switch.set() state: %i\n",state); if (state == IDLE) --- 144,148 ---- command result_t Switch.set[uint8_t id](char l_position, char l_value) { ! //WBDbg(DBG_USR2, "MicaWBSwitch.Switch.set() state: %i\n",state); if (state == IDLE) *************** *** 165,169 **** command result_t Switch.setAll[uint8_t id](char l_value) { ! WBDbg(DBG_USR2, "MicaWBSwitch.Switch.setAll() state: %i\n",state); if (state == IDLE) --- 163,167 ---- command result_t Switch.setAll[uint8_t id](char l_value) { ! //WBDbg(DBG_USR2, "MicaWBSwitch.Switch.setAll() state: %i\n",state); if (state == IDLE) *************** *** 184,188 **** ! WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch0.writePacketDone() state: %i\n",state); if (state == SET_SWITCH) --- 182,186 ---- ! //WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch0.writePacketDone() state: %i\n",state); if (state == SET_SWITCH) *************** *** 200,204 **** event result_t I2CSwitch1.writePacketDone(bool result) { ! WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch1.writePacketDone() state: %i\n",state); if (state == SET_SWITCH) --- 198,202 ---- event result_t I2CSwitch1.writePacketDone(bool result) { ! //WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch1.writePacketDone() state: %i\n",state); if (state == SET_SWITCH) *************** *** 217,221 **** ! WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch0.readPacketDone() state: %i\n",state); if (state == GET_SWITCH) { --- 215,219 ---- ! //WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch0.readPacketDone() state: %i\n",state); if (state == GET_SWITCH) { *************** *** 288,292 **** ! WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch1.readPacketDone() state: %i\n",state); if (state == GET_SWITCH) --- 286,290 ---- ! //WBDbg(DBG_USR2, "MicaWBSwitch.I2CSwitch1.readPacketDone() state: %i\n",state); if (state == GET_SWITCH) *************** *** 357,361 **** default event result_t Switch.setDone[uint8_t id](bool result) { ! WBDbg(DBG_USR2, "MicaWBSwitch.Switch.setDone() id: %i\n",id); return SUCCESS; --- 355,359 ---- default event result_t Switch.setDone[uint8_t id](bool result) { ! //WBDbg(DBG_USR2, "MicaWBSwitch.Switch.setDone() id: %i\n",id); return SUCCESS; *************** *** 364,368 **** default event result_t Switch.setAllDone[uint8_t id](bool result) { ! WBDbg(DBG_USR2, "MicaWBSwitch.Switch.setAllDone() id: %i\n",id); return SUCCESS; } --- 362,366 ---- default event result_t Switch.setAllDone[uint8_t id](bool result) { ! //WBDbg(DBG_USR2, "MicaWBSwitch.Switch.setAllDone() id: %i\n",id); return SUCCESS; } *************** *** 370,374 **** default event result_t Switch.getDone[uint8_t id](char l_value) { ! WBDbg(DBG_USR2, "MicaWBSwitch.Switch.getDone() id: %i\n",id); return SUCCESS; } --- 368,372 ---- default event result_t Switch.getDone[uint8_t id](char l_value) { ! //WBDbg(DBG_USR2, "MicaWBSwitch.Switch.getDone() id: %i\n",id); return SUCCESS; } --- SODebug.h DELETED --- --- wbswitch_debug.h DELETED --- |
From: <do...@us...> - 2004-01-14 15:22:58
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestTaos In directory sc8-pr-cvs1:/tmp/cvs-serv18602/TestTaos Modified Files: Makefile Log Message: Fixed Makefiles to reflect new directory names. Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestTaos/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- Makefile 14 Jan 2004 15:22:54 -0000 1.2 *************** *** 1,4 **** COMPONENT=testtaos ! SENSORBOARD=taos include ../Makelocal include $(TOSROOT)/apps/Makerules --- 1,4 ---- COMPONENT=testtaos ! SENSORBOARD=taos_tsl250rd include ../Makelocal include $(TOSROOT)/apps/Makerules |
From: <do...@us...> - 2004-01-14 15:22:57
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestIntersema In directory sc8-pr-cvs1:/tmp/cvs-serv18602/TestIntersema Modified Files: Makefile Log Message: Fixed Makefiles to reflect new directory names. Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestIntersema/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- Makefile 14 Jan 2004 15:22:54 -0000 1.2 *************** *** 1,4 **** COMPONENT=testintersema ! SENSORBOARD=intersema include ../Makelocal include $(TOSROOT)/apps/Makerules --- 1,4 ---- COMPONENT=testintersema ! SENSORBOARD=intersema5534ap include ../Makelocal include $(TOSROOT)/apps/Makerules |
From: <do...@us...> - 2004-01-14 15:22:57
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestSensirion In directory sc8-pr-cvs1:/tmp/cvs-serv18602/TestSensirion Modified Files: Makefile Log Message: Fixed Makefiles to reflect new directory names. Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestSensirion/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- Makefile 14 Jan 2004 15:22:54 -0000 1.2 *************** *** 1,4 **** COMPONENT=testsensirion ! SENSORBOARD=sensirion include ../Makelocal include $(TOSROOT)/apps/Makerules --- 1,4 ---- COMPONENT=testsensirion ! SENSORBOARD=sensirion_sht11 include ../Makelocal include $(TOSROOT)/apps/Makerules |
From: <do...@us...> - 2004-01-14 15:22:57
|
Update of /cvsroot/firebug/fireboard/fireboard/apps In directory sc8-pr-cvs1:/tmp/cvs-serv18602 Modified Files: Makelocal Log Message: Fixed Makefiles to reflect new directory names. Index: Makelocal =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/Makelocal,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makelocal 6 Jan 2004 16:29:46 -0000 1.2 --- Makelocal 14 Jan 2004 15:22:54 -0000 1.3 *************** *** 16,20 **** ! LOCAL_PATH += -I$(MTS420CA)/apps/TestFireBoardData ROUTE_PATH += -I$(BLASTROOT)/Sender \ --- 16,20 ---- ! #LOCAL_PATH += -I$(MTS420CA)/apps/TestFireBoardData ROUTE_PATH += -I$(BLASTROOT)/Sender \ |
From: <do...@us...> - 2004-01-14 15:22:57
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestGPS In directory sc8-pr-cvs1:/tmp/cvs-serv18602/TestGPS Modified Files: testgpsM.nc Log Message: Fixed Makefiles to reflect new directory names. Index: testgpsM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestGPS/testgpsM.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** testgpsM.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- testgpsM.nc 14 Jan 2004 15:22:54 -0000 1.2 *************** *** 70,74 **** call Leds.greenToggle(); ! SODbg(DBG_USR2, "testgpsM.LeadTek.dataReady()...\n"); //call LeadTek.powerOff(); --- 70,74 ---- call Leds.greenToggle(); ! //SODbg(DBG_USR2, "testgpsM.LeadTek.dataReady()...\n"); //call LeadTek.powerOff(); |
From: <do...@us...> - 2004-01-14 14:54:42
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv12716 Modified Files: HPLUART1M.nc HPLUARTC1.nc gps_driverM.nc Log Message: Updated HPLUART1M.nc from the latest cvs snapshot. Had to add async keywords because it appears to be broken. This file needs to be in the gps driver directory because the baud rate is hardcoded instead of being set by the user. Otherwise, the file is the same as what's in the tos/platform/mica2 directory. Index: HPLUART1M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/HPLUART1M.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HPLUART1M.nc 14 Jan 2004 14:24:29 -0000 1.2 --- HPLUART1M.nc 14 Jan 2004 14:54:39 -0000 1.3 *************** *** 1,9 **** ! /* -*- Mode: C; c-basic-indent: 3; indent-tabs-mode: nil -*- */ ! ! /* ! * ! * ! * "Copyright (c) 2000-2002 The Regents of the University of California. * All rights reserved. * --- 1,6 ---- ! // $Id$ ! /* tab:4 ! * "Copyright (c) 2000-2003 The Regents of the University of California. * All rights reserved. * *************** *** 24,64 **** * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * ! */ ! /* tab:4 ! * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By ! * downloading, copying, installing or using the software you agree to ! * this license. If you do not agree to this license, do not download, ! * install, copy or use the software. ! * ! * Intel Open Source License * ! * Copyright (c) 2002 Intel Corporation ! * All rights reserved. ! * Redistribution and use in source and binary forms, with or without ! * modification, are permitted provided that the following conditions are ! * met: ! * ! * Redistributions of source code must retain the above copyright ! * notice, this list of conditions and the following disclaimer. ! * Redistributions in binary form must reproduce the above copyright ! * notice, this list of conditions and the following disclaimer in the ! * documentation and/or other materials provided with the distribution. ! * Neither the name of the Intel Corporation nor the names of its ! * contributors may be used to endorse or promote products derived from ! * this software without specific prior written permission. ! * ! * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ! * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ! * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ! * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS ! * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ! * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ! * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ! * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ! * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ! * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ! * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ! * ! * */ /* --- 21,31 ---- * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * ! * Copyright (c) 2002-2003 Intel Corporation ! * All rights reserved. * ! * This file is distributed under the terms in the attached INTEL-LICENSE ! * file. If you do not find these files, copies can be found by writing to ! * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA, ! * 94704. Attention: Intel License Inquiry. */ /* *************** *** 76,87 **** // create a separate component module HPLUART1M { provides interface HPLUART as UART; ! uses interface Interrupt; } implementation { - - async command result_t UART.init() { --- 43,60 ---- // create a separate component + + /** + * @author Jason Hill + * @author David Gay + * @author Philip Levis + * @author Phil Buonadonna + */ + module HPLUART1M { provides interface HPLUART as UART; ! } implementation { async command result_t UART.init() { *************** *** 93,97 **** // 4800 bps 191 ! // Set Baud Rate outp(0,UBRR1H); outp(191, UBRR1L); --- 66,70 ---- // 4800 bps 191 ! // Set at 4800 for communicating with the LeadTek GPS. outp(0,UBRR1H); outp(191, UBRR1L); *************** *** 106,122 **** outp(((1 << RXCIE) | (1 << TXCIE) | (1 << RXEN) | (1 << TXEN)) ,UCSR1B); ! call Interrupt.enable(); return SUCCESS; } async command result_t UART.stop() { - outp(0x00, UCSR1A); - outp(0x00, UCSR1B); - outp(0x00, UCSR1C); return SUCCESS; } ! default async event result_t UART.get(uint8_t data) { return SUCCESS; } ! TOSH_SIGNAL(SIG_UART1_RECV) { if (inp(UCSR1A) & (1 << RXC)) --- 79,91 ---- outp(((1 << RXCIE) | (1 << TXCIE) | (1 << RXEN) | (1 << TXEN)) ,UCSR1B); ! return SUCCESS; } async command result_t UART.stop() { return SUCCESS; } ! async default event result_t UART.get(uint8_t data) { return SUCCESS; } TOSH_SIGNAL(SIG_UART1_RECV) { if (inp(UCSR1A) & (1 << RXC)) *************** *** 124,132 **** } ! default async event result_t UART.putDone() { ! ! return SUCCESS; ! } ! TOSH_INTERRUPT(SIG_UART1_TRANS) { signal UART.putDone(); --- 93,97 ---- } ! async default event result_t UART.putDone() { return SUCCESS; } TOSH_INTERRUPT(SIG_UART1_TRANS) { signal UART.putDone(); *************** *** 134,140 **** async command result_t UART.put(uint8_t data) { - outp(data, UDR1); sbi(UCSR1A, TXC); ! return SUCCESS; } --- 99,104 ---- async command result_t UART.put(uint8_t data) { sbi(UCSR1A, TXC); ! outp(data, UDR1); return SUCCESS; } Index: HPLUARTC1.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/HPLUARTC1.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HPLUARTC1.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- HPLUARTC1.nc 14 Jan 2004 14:54:39 -0000 1.2 *************** *** 77,83 **** implementation { ! components HPLUART1M as HPLUART0M, HPLInterrupt; UART = HPLUART0M; ! HPLUART0M.Interrupt -> HPLInterrupt; } --- 77,83 ---- implementation { ! components HPLUART1M as HPLUART0M;//, HPLInterrupt; UART = HPLUART0M; ! //HPLUART0M.Interrupt -> HPLInterrupt; } Index: gps_driverM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/gps_driverM.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gps_driverM.nc 14 Jan 2004 14:21:46 -0000 1.3 --- gps_driverM.nc 14 Jan 2004 14:54:39 -0000 1.4 *************** *** 294,300 **** call Leds.greenToggle(); ! signal Sensor.dataReady(gps_data); ! return SUCCESS; //Don't worry about this for now. --- 294,300 ---- call Leds.greenToggle(); ! signal Sensor.dataReady((void*)gps_data); ! return data; //Don't worry about this for now. |
From: <do...@us...> - 2004-01-14 14:30:39
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv8809 Removed Files: SODebug.h Log Message: Moved debug file out. --- SODebug.h DELETED --- |
From: <do...@us...> - 2004-01-14 14:28:56
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv8383 Removed Files: gga.nc ggaM.nc Log Message: Removed extraneous gga handling files. These functions should be handled by the gps unit. --- gga.nc DELETED --- --- ggaM.nc DELETED --- |
From: <do...@us...> - 2004-01-14 14:27:14
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv8022 Removed Files: Switch.nc Log Message: Removed unnecessary switch interface. --- Switch.nc DELETED --- |
From: <do...@us...> - 2004-01-14 14:24:31
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv7375 Modified Files: HPLUART1M.nc Removed Files: gps_debug.h Log Message: Removed unneeded gps debug header file. Index: HPLUART1M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/HPLUART1M.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HPLUART1M.nc 5 Jan 2004 21:03:27 -0000 1.1.1.1 --- HPLUART1M.nc 14 Jan 2004 14:24:29 -0000 1.2 *************** *** 83,91 **** { - #define GPS_DEBUG 0 - #include "gps_debug.h" async command result_t UART.init() { - GPSDbg(DBG_BOOT, "HPLUART1M.UART1.init() initialized\n"); // UART will run at: (N-8-1) --- 83,88 ---- --- gps_debug.h DELETED --- |
From: <do...@us...> - 2004-01-14 14:21:49
|
Update of /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546 In directory sc8-pr-cvs1:/tmp/cvs-serv6882 Modified Files: gps_driverM.nc Removed Files: ADCError.nc Log Message: Removed unneeded adc file. Index: gps_driverM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/sensors/leadtek9546/gps_driverM.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gps_driverM.nc 14 Jan 2004 14:05:34 -0000 1.2 --- gps_driverM.nc 14 Jan 2004 14:21:46 -0000 1.3 *************** *** 46,51 **** interface Leds; - interface Timer as GPSTimer; - interface StdControl as SwitchControl; interface Switch as PowerSwitch; --- 46,49 ---- *************** *** 70,78 **** enum {IDLE, BUSY, BUSY_0, BUSY_1, GET_SAMPLE_0, GET_SAMPLE_1, ! //OPENSCK, OPENDATA, CLOSESCK, CLOSEDATA, ! POWEROFF, ! //MAIN_SWITCH_ON, MAIN_SWITCH_OFF, WAIT_SWITCH_ON, WAIT_SWITCH_OFF, ! TIMER, GPS_WORKING, GPS_FINISHED}; ! --- 68,72 ---- enum {IDLE, BUSY, BUSY_0, BUSY_1, GET_SAMPLE_0, GET_SAMPLE_1, ! POWEROFF, TIMER, GPS_WORKING, GPS_FINISHED}; *************** *** 96,101 **** call GpsControl.start(); SODbg(DBG_USR2, "gps_driverM.StdControl.start()\n"); - // Timer is internal to the GPS sensor. - //call readGps(); return SUCCESS; } --- 90,93 ---- *************** *** 103,110 **** command result_t StdControl.stop() { - /** Turn the timer off so that it doesn't fire any - * sensor readings. Timer.stop always returns success. - */ - //call GPSTimer.stop(); return SUCCESS; } --- 95,98 ---- *************** *** 138,149 **** } - - event result_t GPSTimer.fired() { - - call readGps(); - return SUCCESS; - } - - event result_t PowerSwitch.getDone(char value) { return SUCCESS; --- 126,129 ---- *************** *** 304,308 **** event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) { ! //uint8_t i; GPS_MsgPtr gps_data = (GPS_MsgPtr)data; --- 284,288 ---- event TOS_MsgPtr GpsReceive.receive(TOS_MsgPtr data) { ! //uint8_t i; GPS_MsgPtr gps_data = (GPS_MsgPtr)data; *************** *** 314,317 **** --- 294,302 ---- call Leds.greenToggle(); + signal Sensor.dataReady(gps_data); + + return SUCCESS; + + //Don't worry about this for now. if ((call isGGA(gps_data->data))) { SODbg(DBG_USR2, "gps_driverM.GpsReceive.receive() GGA Data\n"); *************** *** 364,371 **** event result_t GpsCmd.SwitchesSet(uint8_t PowerState) { - //char tmp[] = {"Foo"}; - //SODbg(DBG_USR2, "gps_new.GpsCmd.SwitchesSet(): PowerState: %i \n\n", PowerState); ! //SODbg(DBG_USR2, "gps_driverM.GpsCmd.SwitchesSet(): dummy string: %s \n", tmp); call Leds.yellowOn(); call Leds.redOff(); --- 349,354 ---- event result_t GpsCmd.SwitchesSet(uint8_t PowerState) { //SODbg(DBG_USR2, "gps_new.GpsCmd.SwitchesSet(): PowerState: %i \n\n", PowerState); ! call Leds.yellowOn(); call Leds.redOff(); --- ADCError.nc DELETED --- |