Thread: [Firebug-cvs] fireboard/fireboard/sensors/leadtek9546 UART1.nc,1.3,1.4 gps_driverM.nc,1.5,1.6
Brought to you by:
doolin
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; } |