[Firebug-cvs] fireboard/beta/apps/XSensorMTS400 Makefile,1.3,1.4 TestMTS400M.nc,1.3,1.4 appFeatures.
Brought to you by:
doolin
From: David M. D. <do...@us...> - 2005-05-23 22:10:03
|
Update of /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4798/apps/XSensorMTS400 Modified Files: Makefile TestMTS400M.nc appFeatures.h Log Message: Removed cpp directives for mts420 Index: TestMTS400M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/TestMTS400M.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TestMTS400M.nc 23 May 2005 21:34:37 -0000 1.3 --- TestMTS400M.nc 23 May 2005 22:09:52 -0000 1.4 *************** *** 159,163 **** interface SendMsg as Send; interface ReceiveMsg as Receive; ! #ifdef MTS420 //gps // interface I2CSwitchCmds as GpsCmd; --- 159,163 ---- interface SendMsg as Send; interface ReceiveMsg as Receive; ! //gps // interface I2CSwitchCmds as GpsCmd; *************** *** 168,172 **** interface SendVarLenPacket as GpsSend; interface ReceiveVarLenPacket as GpsReceive; ! #endif // Battery interface ADC as ADCBATT; --- 168,172 ---- interface SendVarLenPacket as GpsSend; interface ReceiveVarLenPacket as GpsReceive; ! // Battery interface ADC as ADCBATT; *************** *** 344,350 **** call Leds.init(); call Leds.greenOn(); ! #ifdef MTS420 call GpsControl.init(); ! #endif call TaosControl.init(); call AccelControl.init(); //initialize accelerometer --- 344,350 ---- call Leds.init(); call Leds.greenOn(); ! call GpsControl.init(); ! call TaosControl.init(); call AccelControl.init(); //initialize accelerometer *************** *** 362,368 **** call BattControl.start(); ! #ifdef MTS420 call GpsControl.start(); ! #endif atomic state = START; --- 362,368 ---- call BattControl.start(); ! call GpsControl.start(); ! atomic state = START; *************** *** 377,384 **** command result_t StdControl.stop() { call BattControl.stop(); ! #ifdef MTS420 call GpsControl.stop(); call GpsCmd.TxRxSwitch(0); ! #endif call Timer.stop(); call CommControl.stop(); --- 377,384 ---- command result_t StdControl.stop() { call BattControl.stop(); ! call GpsControl.stop(); call GpsCmd.TxRxSwitch(0); ! call Timer.stop(); call CommControl.stop(); *************** *** 392,400 **** *****************************************************************************/ event result_t Timer.fired() { uint8_t l_state; call Leds.redToggle(); - #ifdef MTS420 if (!gps_pwr_on){ //turn on GPS power, stays on for entire test --- 392,400 ---- *****************************************************************************/ event result_t Timer.fired() { + uint8_t l_state; call Leds.redToggle(); if (!gps_pwr_on){ //turn on GPS power, stays on for entire test *************** *** 402,406 **** return SUCCESS; } ! #endif atomic l_state = state; --- 402,406 ---- return SUCCESS; } ! atomic l_state = state; *************** *** 422,428 **** * communication, comment following GpsCmd.PowerSwitch(0) line */ - #ifdef MTS420 // if (gps_pwr_on)call GpsCmd.PowerSwitch(0); - #endif post send_msg(); return SUCCESS; --- 422,426 ---- *************** *** 433,444 **** #if FEATURE_GPS_ONLY call Leds.greenOff(); - #ifdef MTS420 atomic state = GPS_BUSY; return call GpsCmd.TxRxSwitch(1); //enable gps tx/rx #else - atomic state = START; - return SUCCESS; - #endif - #else atomic{ state = BUSY; --- 431,437 ---- *************** *** 482,495 **** case ACCEL_DONE: call Leds.greenOff(); - #ifdef MTS420 atomic state = GPS_BUSY; return call GpsCmd.TxRxSwitch(1); //enable gps tx/rx - #else - atomic state = START; - return SUCCESS; - #endif break; ! #ifdef MTS420 case GPS_BUSY: if (gps_wait_cnt >= GPS_MAX_WAIT) --- 475,483 ---- case ACCEL_DONE: call Leds.greenOff(); atomic state = GPS_BUSY; return call GpsCmd.TxRxSwitch(1); //enable gps tx/rx break; ! case GPS_BUSY: if (gps_wait_cnt >= GPS_MAX_WAIT) *************** *** 510,514 **** return SUCCESS; break; ! #endif } return SUCCESS; --- 498,502 ---- return SUCCESS; break; ! } return SUCCESS; *************** *** 516,525 **** ! #ifdef MTS420 /****************************************************************************** * Packet received from GPS - ASCII msg * 1st byte in pkt is number of ascii bytes * async used only for testing ! GGA - Global Positioning System Fix Data GGA,123519,4807.038,N,01131.324,E,1,08,0.9,545.4,M,46.9,M, , *42 123519 Fix taken at 12:35:19 UTC --- 504,513 ---- ! /****************************************************************************** * Packet received from GPS - ASCII msg * 1st byte in pkt is number of ascii bytes * async used only for testing ! GGA - Global Positioning System Fix Data GGA,123519,4807.038,N,01131.324,E,1,08,0.9,545.4,M,46.9,M, , *42 123519 Fix taken at 12:35:19 UTC *************** *** 581,585 **** } ! #endif /**************************************************************************** --- 569,573 ---- } ! /**************************************************************************** Index: appFeatures.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/appFeatures.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** appFeatures.h 23 May 2005 21:34:37 -0000 1.2 --- appFeatures.h 23 May 2005 22:09:52 -0000 1.3 *************** *** 9,12 **** --- 9,19 ---- * $Id$ */ + + + + // 23 May 2005: I removed all the MTS420 #ifdefs from the + // code, but will leave this here for now to define the + // SENSOR_BOARD_ID. --dmd + // crossbow sensor board id //define MTS420 to enable gps. *************** *** 15,19 **** #define MTS420 - #ifndef MTS420 #define SENSOR_BOARD_ID 0x85 //MTS400 sensor board id --- 22,25 ---- *************** *** 22,25 **** --- 28,36 ---- #endif + + // 23 May 2005: It's not clear how this code feature works, + // because it seems like either the GPS will run, or the weather + // sensors will run, but not both at the same time. -dmd + // TODO: Get rid of this "feature." #define FEATURE_GPS_ONLY 0 *************** *** 27,30 **** --- 38,45 ---- #define FEATURE_GPS_ONLY 0 #endif + + + + // TODO: 23 May 2005: Get rid of all this xee shit. -dmd // current Xee lib donnot support MicaZ #ifdef PLATFORM_MICAZ Index: Makefile =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 23 May 2005 21:34:37 -0000 1.3 --- Makefile 23 May 2005 22:09:50 -0000 1.4 *************** *** 11,15 **** PFLAGS=-I$(XBOWBETAROOT)/lib/Xee -I$(XBOWROOT)/platform/$(PLATFORM) \ -I$(XBOWROOT)/AXStack/$(PLATFORM) -I$(XBOWROOT)/lib \ ! -I$(XBOWBETAROOT)/sensorboards/$(SENSORBOARD) -I$(XBOWBETAROOT)/sensorboards/$(SENSORBOARD)/gps --- 11,15 ---- PFLAGS=-I$(XBOWBETAROOT)/lib/Xee -I$(XBOWROOT)/platform/$(PLATFORM) \ -I$(XBOWROOT)/AXStack/$(PLATFORM) -I$(XBOWROOT)/lib \ ! -I$(XBOWBETAROOT)/sensorboards/$(SENSORBOARD) \ -I$(XBOWBETAROOT)/sensorboards/$(SENSORBOARD)/gps |