Subversion Repositories NaviCtrl

Rev

Rev 612 | Rev 633 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 612 Rev 614
Line 119... Line 119...
119
                doc->state = GPX_DOC_OPENED;                                                                                            // change document state to opened. At next a placemark has to be opened.
119
                doc->state = GPX_DOC_OPENED;                                                                                            // change document state to opened. At next a placemark has to be opened.
120
                fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document.
120
                fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document.
121
                sprintf(string, "<desc>FC HW:%d.%d SW:%d.%02d%c + NC HW:%d.%d SW:%d.%02d%c + BL HW:V%d SW:%d.%02d", (FC_Version.Hardware & 0x7F)/10,(FC_Version.Hardware & 0x7F)%10, FC_Version.Major, FC_Version.Minor, 'a'+FC_Version.Patch, UART_VersionInfo.HWMajor/10, UART_VersionInfo.HWMajor%10, VERSION_MAJOR,  VERSION_MINOR, 'a'+ VERSION_PATCH,BLv,UART_VersionInfo.BL_Firmware/100,UART_VersionInfo.BL_Firmware%100);
121
                sprintf(string, "<desc>FC HW:%d.%d SW:%d.%02d%c + NC HW:%d.%d SW:%d.%02d%c + BL HW:V%d SW:%d.%02d", (FC_Version.Hardware & 0x7F)/10,(FC_Version.Hardware & 0x7F)%10, FC_Version.Major, FC_Version.Minor, 'a'+FC_Version.Patch, UART_VersionInfo.HWMajor/10, UART_VersionInfo.HWMajor%10, VERSION_MAJOR,  VERSION_MINOR, 'a'+ VERSION_PATCH,BLv,UART_VersionInfo.BL_Firmware/100,UART_VersionInfo.BL_Firmware%100);
122
                fputs_(string, doc->file);
122
                fputs_(string, doc->file);
123
                if(SimulationFlags) { sprintf(string, " SIMULATED"); fputs_(string, doc->file);};
123
                if(SimulationFlags) { sprintf(string, " SIMULATED"); fputs_(string, doc->file);};
124
                if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE) sprintf(string, " (Redundant)</desc>\r\n");
124
                if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE) sprintf(string, " (Redundant)</desc>\r\n");
125
                else sprintf(string, "</desc>\r\n");
125
                else sprintf(string, "</desc>\r\n");
126
                fputs_(string, doc->file);
126
                fputs_(string, doc->file);
127
        sprintf(string, "<extensions>\r\n");  fputs_(string, doc->file);
127
        sprintf(string, "<extensions>\r\n");  fputs_(string, doc->file);
128
         sprintf(string, "<MK_Time>%imin</MK_Time>\r\n",FlugMinutenGesamt);fputs_(string, doc->file);
128
         sprintf(string, "<MK_Time>%imin</MK_Time>\r\n",FlugMinutenGesamt);fputs_(string, doc->file);
129
     sprintf(string, "<GpsVersion>%d.%03d</GpsVersion>\r\n",GPS_Version/1000,GPS_Version%1000);fputs_(string, doc->file);
129
     sprintf(string, "<GpsVersion>%d.%03d</GpsVersion>\r\n",GPS_Version/1000,GPS_Version%1000);fputs_(string, doc->file);
Line 568... Line 568...
568
                                sprintf(string, "<AnalogInputs>%d,%d,%d,%d</AnalogInputs>\r\n",AnalogData.Ch4,AnalogData.Ch5,AnalogData.Ch6,AnalogData.Ch7);
568
                                sprintf(string, "<AnalogInputs>%d,%d,%d,%d</AnalogInputs>\r\n",AnalogData.Ch4,AnalogData.Ch5,AnalogData.Ch6,AnalogData.Ch7);
569
                                fputs_(string, doc->file);
569
                                fputs_(string, doc->file);
570
                                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°
570
                                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°
571
                                fputs_(string, doc->file);
571
                                fputs_(string, doc->file);
Line -... Line 572...
-
 
572
 
-
 
573
                        if(NC_GPS_ModeCharacter == 'F') // Failsafe Point is active
-
 
574
                        {
-
 
575
                                sprintf(string, "<WP>FAIL,%d,%d,%d</WP>\r\n",NaviData.WaypointIndex,NaviData.WaypointNumber,LogFC_WP_EventChannel);      // x of y Waypoints and the actual value of the Event Channel
-
 
576
                                LogFC_WP_EventChannel = 0;
-
 
577
                        }
-
 
578
                         else
572
 
579
                        {
573
                                if(GPS_pWaypoint != NULL) // if WP exist
580
                                if(GPS_pWaypoint != NULL) // if WP exist
574
                                 {                                        // copy that name
581
                                 {                                        // copy that name
575
                                  u8 i;
582
                                  u8 i;
576
                                   for(i=0;i<4;i++)
583
                                   for(i=0;i<4;i++)
Line 579... Line 586...
579
                                         if(name[i] < ' ') name[i] = ' ';
586
                                         if(name[i] < ' ') name[i] = ' ';
580
                                        }
587
                                        }
581
                                 }
588
                                 }
582
                                sprintf(string, "<WP>%s,%d,%d,%d</WP>\r\n",name,NaviData.WaypointIndex,NaviData.WaypointNumber,LogFC_WP_EventChannel);   // x of y Waypoints and the actual value of the Event Channel
589
                                sprintf(string, "<WP>%s,%d,%d,%d</WP>\r\n",name,NaviData.WaypointIndex,NaviData.WaypointNumber,LogFC_WP_EventChannel);   // x of y Waypoints and the actual value of the Event Channel
583
                                LogFC_WP_EventChannel = 0; // can be cleared now
590
                                LogFC_WP_EventChannel = 0; // can be cleared now
-
 
591
                          }
584
                                fputs_(string, doc->file);
592
                                fputs_(string, doc->file);
-
 
593
 
585
                                sprintf(string, "<ShutterCnt>%d</ShutterCnt>\r\n",NaviData_Volatile.ShutterCounter);   
594
                                sprintf(string, "<ShutterCnt>%d</ShutterCnt>\r\n",NaviData_Volatile.ShutterCounter);   
586
                                LogFC_WP_EventChannel = 0; // can be cleared now
595
                                LogFC_WP_EventChannel = 0; // can be cleared now
587
                                fputs_(string, doc->file);
596
                                fputs_(string, doc->file);
588
                           break;
597
                           break;
589
                           case 7:
598
                           case 7: