[Firebug-cvs] fireboard/beta/apps/XSensorMTS400 TestMTS400.nc,1.2,1.3 TestMTS400M.nc,1.5,1.6 appFeat
Brought to you by:
doolin
From: David M. D. <do...@us...> - 2005-05-24 21:53:27
|
Update of /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28583 Modified Files: TestMTS400.nc TestMTS400M.nc appFeatures.h sensorboardApp.h Log Message: Working mts400 test code, had to be copied in from xbow stable. Index: TestMTS400M.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/TestMTS400M.nc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestMTS400M.nc 23 May 2005 22:25:18 -0000 1.5 --- TestMTS400M.nc 24 May 2005 21:53:17 -0000 1.6 *************** *** 1,3 **** ! /* * * --- 1,3 ---- ! /* tab:4 * * *************** *** 22,26 **** * [...1385 lines suppressed...] ! { ! IsUART = !IsUART; // change to uart send ! atomic { ! WaitingForSend = FALSE; // both uart and radio sent, done for current msg ! sending_packet = FALSE; ! } } ! return SUCCESS; } /**************************************************************************** ! * Uart msg rcvd. ! * This app doesn't respond to any incoming uart msg ! * Just return ! ****************************************************************************/ event TOS_MsgPtr Receive.receive(TOS_MsgPtr data) { ! return data; } Index: sensorboardApp.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/sensorboardApp.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sensorboardApp.h 23 May 2005 21:34:37 -0000 1.2 --- sensorboardApp.h 24 May 2005 21:53:17 -0000 1.3 *************** *** 2,13 **** - - // TODO: Delete this bullshit if possible. #define MAKE_GPS_ENA_OUTPUT() sbi(DDRE,6) #define SET_GPS_ENA() cbi(PORTE,6) #define CLR_GPS_ENA() sbi(PORTE,6) typedef struct XSensorHeader{ --- 2,34 ---- #define MAKE_GPS_ENA_OUTPUT() sbi(DDRE,6) #define SET_GPS_ENA() cbi(PORTE,6) #define CLR_GPS_ENA() sbi(PORTE,6) + #define GPS_MSG_LENGTH 100 + #define GPS_CHAR 11 + #define GGA_FIELDS 8 + #define GPS_CHAR_PER_FIELD 10 + #define GPS_DELIMITER ',' + #define GPS_END_MSG '*' + // 18 bytes. + // + //struct _gga_msg + //{ + // uint8_t hours; + // uint8_t minutes; + // float dec_sec; + // uint8_t Lat_deg; + // float Lat_dec_min; + // uint8_t Long_deg; + // float Long_dec_min; + // uint8_t NSEWind; + // uint8_t num_sats; + //}; + //typedef struct _gga_msg GGA_Msg; + // + // typedef struct XSensorHeader{ *************** *** 53,67 **** }; - typedef struct MyGPS_Msg - { - /* The following fields are received on the gps. */ - int8_t data[60]; - } MyGPS_Msg; - typedef struct XDataMsg { XSensorHeader xSensorHeader; union { XSensorMTS400DataMsg data1; ! MyGPS_Msg dataGps; }xData; } __attribute__ ((packed)) XDataMsg; --- 74,82 ---- }; typedef struct XDataMsg { XSensorHeader xSensorHeader; union { XSensorMTS400DataMsg data1; ! GGAMsg dataGps; }xData; } __attribute__ ((packed)) XDataMsg; Index: appFeatures.h =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/appFeatures.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** appFeatures.h 23 May 2005 22:09:52 -0000 1.3 --- appFeatures.h 24 May 2005 21:53:17 -0000 1.4 *************** *** 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. --- 9,12 ---- *************** *** 22,25 **** --- 15,19 ---- #define MTS420 + #ifndef MTS420 #define SENSOR_BOARD_ID 0x85 //MTS400 sensor board id *************** *** 28,45 **** #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 #ifndef FEATURE_GPS_ONLY #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 --- 22,30 ---- #endif ! //#define FEATURE_GPS_ONLY 1 #ifndef FEATURE_GPS_ONLY #define FEATURE_GPS_ONLY 0 #endif // current Xee lib donnot support MicaZ #ifdef PLATFORM_MICAZ Index: TestMTS400.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/beta/apps/XSensorMTS400/TestMTS400.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestMTS400.nc 23 May 2005 19:09:43 -0000 1.2 --- TestMTS400.nc 24 May 2005 21:53:17 -0000 1.3 *************** *** 1,3 **** ! /* * * --- 1,3 ---- ! /* tab:4 * * *************** *** 22,26 **** * */ ! /* * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By * downloading, copying, installing or using the software you agree to --- 22,26 ---- * */ ! /* tab:4 * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By * downloading, copying, installing or using the software you agree to *************** *** 72,76 **** XEE_PARAMS_COMPONENT #ifdef MTS420 ! GpsPacketC, #endif ADCC; --- 72,76 ---- XEE_PARAMS_COMPONENT #ifdef MTS420 ! UARTGpsPacket, #endif ADCC; *************** *** 87,94 **** // Wiring for gps #ifdef MTS420 ! TestMTS400M.GpsControl -> GpsPacketC; ! TestMTS400M.GpsSend -> GpsPacketC; ! TestMTS400M.GpsReceive -> GpsPacketC; ! TestMTS400M.GpsCmd -> GpsPacketC.GpsCmd; //UARTGpsPacket.GpsCmd; #endif --- 87,94 ---- // Wiring for gps #ifdef MTS420 ! TestMTS400M.GpsControl -> UARTGpsPacket; ! //TestMTS400M.GpsSend -> UARTGpsPacket; ! TestMTS400M.GpsReceive -> UARTGpsPacket; ! TestMTS400M.GpsCmd -> UARTGpsPacket.GpsCmd; //UARTGpsPacket.GpsCmd; #endif |