Rev 380 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 380 | Rev 386 | ||
---|---|---|---|
Line 284... | Line 284... | ||
284 | u8 GPX_TrackSegementAddPoint(GPX_Document_t *doc,unsigned char part) |
284 | u8 GPX_TrackSegementAddPoint(GPX_Document_t *doc,unsigned char part) |
285 | { |
285 | { |
Line 286... | Line 286... | ||
286 | 286 | ||
287 | u8 retvalue = 0; |
287 | u8 retvalue = 0; |
- | 288 | s8 string[100]; |
|
Line 288... | Line 289... | ||
288 | s8 string[100]; |
289 | s8 name[] = "----\0"; |
Line 289... | Line 290... | ||
289 | 290 | ||
290 | if(doc == NULL) return(0); |
291 | if(doc == NULL) return(0); |
Line 300... | Line 301... | ||
300 | u8 u8_1, u8_2; |
301 | u8 u8_1, u8_2; |
301 | // write <trkpt> tag |
302 | // write <trkpt> tag |
302 | switch(part) |
303 | switch(part) |
303 | { |
304 | { |
304 | case 0: |
305 | case 0: |
305 | DebugOut.Analog[19]++; |
- | |
306 | Logged_GPX_Counter++; |
306 | Logged_GPX_Counter++; |
307 | if(GPSData.Position.Latitude < 0) u8_1 = '-'; |
307 | if(GPSData.Position.Latitude < 0) u8_1 = '-'; |
308 | else u8_1 = '+'; |
308 | else u8_1 = '+'; |
309 | i32_1 = abs(GPSData.Position.Latitude)/10000000L; |
309 | i32_1 = abs(GPSData.Position.Latitude)/10000000L; |
310 | i32_2 = abs(GPSData.Position.Latitude)%10000000L; |
310 | i32_2 = abs(GPSData.Position.Latitude)%10000000L; |
Line 417... | Line 417... | ||
417 | // NC Mode (contains the status) |
417 | // NC Mode (contains the status) |
418 | sprintf(string, "<NCFlag>0x%02X</NCFlag>\r\n", NCFlags); |
418 | sprintf(string, "<NCFlag>0x%02X</NCFlag>\r\n", NCFlags); |
419 | fputs_(string, doc->file); |
419 | fputs_(string, doc->file); |
420 | sprintf(string, "<Servo>%d,%d,%d</Servo>\r\n", ServoParams.NickControl,ServoParams.RollControl,POI_KameraNick/10); // Raw Poti-Values of the Servo control and the POI_Nick in 1° |
420 | sprintf(string, "<Servo>%d,%d,%d</Servo>\r\n", ServoParams.NickControl,ServoParams.RollControl,POI_KameraNick/10); // Raw Poti-Values of the Servo control and the POI_Nick in 1° |
421 | fputs_(string, doc->file); |
421 | fputs_(string, doc->file); |
- | 422 | ||
- | 423 | if(GPS_pWaypoint != NULL) // if WP exist |
|
- | 424 | { // copy that name |
|
- | 425 | u8 i; |
|
- | 426 | for(i=0;i<4;i++) |
|
- | 427 | { |
|
- | 428 | name[i] = GPS_pWaypoint->Name[i]; |
|
- | 429 | if(name[i] < ' ') name[i] = ' '; |
|
- | 430 | } |
|
- | 431 | } |
|
422 | sprintf(string, "<WP>%d,%d,%d</WP>\r\n",NaviData.WaypointIndex,NaviData.WaypointNumber,FC_WP_EventChannel); // x of y Waypoints and the actual value of the Event Channel |
432 | sprintf(string, "<WP>%s,%d,%d,%d</WP>\r\n",name,NaviData.WaypointIndex,NaviData.WaypointNumber,FC_WP_EventChannel); // x of y Waypoints and the actual value of the Event Channel |
423 | fputs_(string, doc->file); |
433 | fputs_(string, doc->file); |
424 | break; |
434 | break; |
425 | case 7: |
435 | case 7: |
426 | // Flags |
436 | // Flags |
427 | sprintf(string, "<FCFlags2>0x%02x,0x%02x</FCFlags2>\r\n",Logging_FCStatusFlags1,Logging_FCStatusFlags2); |
437 | sprintf(string, "<FCFlags2>0x%02x,0x%02x</FCFlags2>\r\n",Logging_FCStatusFlags1,Logging_FCStatusFlags2); |