[Firebug-cvs] mts400/sensors/gps GpsPacket.nc,1.5,1.6 HPLUART1M.nc,1.2,1.3
Brought to you by:
doolin
From: <do...@us...> - 2003-11-18 22:45:14
|
Update of /cvsroot/firebug/mts400/sensors/gps In directory sc8-pr-cvs1:/tmp/cvs-serv26771/sensors/gps Modified Files: GpsPacket.nc HPLUART1M.nc Log Message: Worked over the debugging output for gps. Index: GpsPacket.nc =================================================================== RCS file: /cvsroot/firebug/mts400/sensors/gps/GpsPacket.nc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GpsPacket.nc 15 Nov 2003 00:44:51 -0000 1.5 --- GpsPacket.nc 18 Nov 2003 22:45:11 -0000 1.6 *************** *** 103,107 **** implementation { ! #include "SODebug.h" #include "gps.h" --- 103,108 ---- implementation { ! #define GPS_DEBUG 0 ! #include "gps_debug.h" #include "gps.h" *************** *** 347,351 **** uint16_t strength) { ! //SODbg(DBG_USR2, "PACKET: byte arrived: %x, COUNT: %i\n", data, rxCount); //FIXME: See if this works, remove global if possible. --- 348,352 ---- uint16_t strength) { ! //GPSDbg(DBG_USR2, "PACKET: byte arrived: %x, COUNT: %i\n", data, rxCount); //FIXME: See if this works, remove global if possible. *************** *** 375,379 **** if (rxCount == GPS_DATA_LENGTH ) { ! SODbg(DBG_USR2, "gps packet too large- flushed \n"); state_gps_pkt = NO_GPS_START_BYTE; return SUCCESS; --- 376,380 ---- if (rxCount == GPS_DATA_LENGTH ) { ! GPSDbg(DBG_USR2, "gps packet too large- flushed \n"); state_gps_pkt = NO_GPS_START_BYTE; return SUCCESS; *************** *** 389,393 **** // bufferIndex = bufferIndex ^ 1; // recPtr = (uint8_t*)bufferPtr; ping pong buffers !!!!!!!!!!!!!!!!!! ! // SODbg(DBG_USR2, "got gps packet; # of bytes = %i \n", rxCount); // rxCount = 0; // post receiveTask(); --- 390,394 ---- // bufferIndex = bufferIndex ^ 1; // recPtr = (uint8_t*)bufferPtr; ping pong buffers !!!!!!!!!!!!!!!!!! ! // GPSDbg(DBG_USR2, "got gps packet; # of bytes = %i \n", rxCount); // rxCount = 0; // post receiveTask(); *************** *** 410,414 **** ! SODbg(DBG_USR2, "GpsPacket.PowerSwitch.setDone(): PowerState: %i \n", PowerState); if (state_gps == GPS_SWITCH_IDLE){ --- 411,415 ---- ! GPSDbg(DBG_USR2, "GpsPacket.PowerSwitch.setDone(): PowerState: %i \n", PowerState); if (state_gps == GPS_SWITCH_IDLE){ *************** *** 420,429 **** if (call PowerSwitch.set(MICAWB_GPS_POWER,0) == SUCCESS) { state_gps = GPS_PWR_SWITCH_WAIT; ! SODbg(DBG_USR2, "GpsPacket.PowerSwitch.setDone(): 2d arg 0\n"); } } else { if (call PowerSwitch.set(MICAWB_GPS_POWER,1) == SUCCESS) { state_gps = GPS_PWR_SWITCH_WAIT; ! SODbg(DBG_USR2, "GpsPacket.PowerSwitch.setDone(): 2d arg 1\n"); } } --- 421,430 ---- if (call PowerSwitch.set(MICAWB_GPS_POWER,0) == SUCCESS) { state_gps = GPS_PWR_SWITCH_WAIT; ! GPSDbg(DBG_USR2, "GpsPacket.PowerSwitch.setDone(): 2d arg 0\n"); } } else { if (call PowerSwitch.set(MICAWB_GPS_POWER,1) == SUCCESS) { state_gps = GPS_PWR_SWITCH_WAIT; ! GPSDbg(DBG_USR2, "GpsPacket.PowerSwitch.setDone(): 2d arg 1\n"); } } *************** *** 463,467 **** } } else if (state_gps == GPS_RX_SWITCH_WAIT) { ! SODbg(DBG_USR2, "GpsPacket.IOSwitch.setDone(): all switches set \n"); state_gps = GPS_SWITCH_IDLE; signal GpsCmd.SwitchesSet(state_gps); --- 464,468 ---- } } else if (state_gps == GPS_RX_SWITCH_WAIT) { ! GPSDbg(DBG_USR2, "GpsPacket.IOSwitch.setDone(): all switches set \n"); state_gps = GPS_SWITCH_IDLE; signal GpsCmd.SwitchesSet(state_gps); Index: HPLUART1M.nc =================================================================== RCS file: /cvsroot/firebug/mts400/sensors/gps/HPLUART1M.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HPLUART1M.nc 13 Nov 2003 00:17:18 -0000 1.2 --- HPLUART1M.nc 18 Nov 2003 22:45:11 -0000 1.3 *************** *** 1,3 **** ! /* tab:4 * * --- 1,6 ---- ! /* -*- Mode: C; c-basic-indent: 3; indent-tabs-mode: nil -*- */ ! ! ! /* * * *************** *** 78,92 **** } implementation ! { ! #include "SODebug.h" async command result_t UART.init() { ! SODbg(DBG_BOOT, "HPLUART1M.UART1.init() initialized\n"); // UART will run at: (N-8-1) ! // Baud UBRR1L Value: ! // 115kbps, 15 ! // 19.2kbps 47 ! // 9600 bps 95 // 4800 bps 191 --- 81,97 ---- } implementation ! { ! ! #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) ! // Baud UBRR1L Value: ! // 115kbps, 15 ! // 19.2kbps 47 ! // 9600 bps 95 // 4800 bps 191 *************** *** 107,120 **** 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)) --- 112,125 ---- 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)) *************** *** 122,126 **** } ! default async event result_t UART.putDone() { return SUCCESS; } TOSH_INTERRUPT(SIG_UART1_TRANS) { signal UART.putDone(); --- 127,135 ---- } ! default async event result_t UART.putDone() { ! ! return SUCCESS; ! } ! TOSH_INTERRUPT(SIG_UART1_TRANS) { signal UART.putDone(); *************** *** 129,134 **** async command result_t UART.put(uint8_t data) { outp(data, UDR1); ! sbi(UCSR1A, TXC); ! return SUCCESS; } --- 138,143 ---- async command result_t UART.put(uint8_t data) { outp(data, UDR1); ! sbi(UCSR1A, TXC); ! return SUCCESS; } |