[Firebug-cvs] fireboard/fireboard/apps/TestGPS testgpsM.nc,1.4,1.5
Brought to you by:
doolin
From: <do...@pr...> - 2004-01-29 11:33:02
|
Update of /cvsroot/firebug/fireboard/fireboard/apps/TestGPS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19299/apps/TestGPS Modified Files: testgpsM.nc Log Message: Fixed string extraction code for gga messages, It was attempting to stuff floats into shorts. Thats a nogo. Index: testgpsM.nc =================================================================== RCS file: /cvsroot/firebug/fireboard/fireboard/apps/TestGPS/testgpsM.nc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** testgpsM.nc 21 Jan 2004 20:35:35 -0000 1.4 --- testgpsM.nc 28 Jan 2004 22:39:59 -0000 1.5 *************** *** 40,45 **** call LeadTek.powerOn(); // Loading programs doesn't work yet. ! //call LeadTek.loadProgram((void*)gps_syncmode_off); return SUCCESS; } --- 40,56 ---- call LeadTek.powerOn(); + // Loading programs doesn't work yet. ! //call LeadTek.loadProgram((void*)gps_test); ! call LeadTek.loadProgram((void*)gps_syncmode_off); ! ! #if 0 ! if (call LeadTek.loadProgram((void*)gps_test)) { ! SODbg(DBG_USR2, "Loading program succeeded in txBytes.\r\n"); ! } else { ! SODbg(DBG_USR2, "Loading program failed in txBytes.\r\n"); ! } ! #endif ! return SUCCESS; } *************** *** 57,64 **** --- 68,78 ---- } + + #define RAW_DATA 0 event result_t LeadTek.dataReady(void * userdata) { int i; + #if RAW_DATA GPS_Msg * gps_data = (GPS_Msg*)userdata; *************** *** 68,71 **** --- 82,101 ---- SODbg(DBG_USR2, "\r\n"); + #else + GGA_Msg * gga_msg = (GGA_Msg*)userdata; + + SODbg(DBG_USR2, "$=================================================\r\n"); + SODbg(DBG_USR2, "$testgpsM.LeadTek.dataReady()\r\n"); + SODbg(DBG_USR2, "$Hours: %i\r\n",(int)(gga_msg->hours)); + SODbg(DBG_USR2, "$Minutes: %i\r\n",(int)(gga_msg->minutes)); + SODbg(DBG_USR2, "$Decimal seconds: %i\r\n",(int)(100*(gga_msg->dec_sec))); + SODbg(DBG_USR2, "$Latitude degrees: %i\r\n",(int)(gga_msg->Lat_deg)); + SODbg(DBG_USR2, "$Latitude decimal minutes: %i\r\n",(int)(100*(gga_msg->Lat_dec_min))); + SODbg(DBG_USR2, "$Longitude degrees: %i\r\n",(int)(gga_msg->Long_deg)); + SODbg(DBG_USR2, "$Longitude decimal minutes: %i\r\n",(int)(100*(gga_msg->Long_dec_min))); + SODbg(DBG_USR2, "$NSEWind: %i\r\n",(gga_msg->NSEWind)); + SODbg(DBG_USR2, "$=================================================\r\n\r\n"); + #endif + call Leds.greenToggle(); |