Rev 547 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 547 | Rev 548 | ||
---|---|---|---|
Line 115... | Line 115... | ||
115 | if(doc->file != NULL) // could the file be opened? |
115 | if(doc->file != NULL) // could the file be opened? |
116 | { |
116 | { |
117 | retvalue = 1; // the document could be created on the drive. |
117 | retvalue = 1; // the document could be created on the drive. |
118 | doc->state = GPX_DOC_OPENED; // change document state to opened. At next a placemark has to be opened. |
118 | doc->state = GPX_DOC_OPENED; // change document state to opened. At next a placemark has to be opened. |
119 | fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document. |
119 | fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document. |
120 | sprintf(string, "<desc>FC HW:%d.%d SW:%d.%02d%c + NC HW:%d.%d SW:%d.%02d%c BL:V%d", (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); |
120 | 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 | fputs_(string, doc->file); |
121 | fputs_(string, doc->file); |
122 | if(FC.RedundanceBlOperation) sprintf(string, " (Redundant)</desc>\r\n"); |
122 | if(FC.RedundanceBlOperation) sprintf(string, " (Redundant)</desc>\r\n"); |
123 | else sprintf(string, "</desc>\r\n"); |
123 | else sprintf(string, "</desc>\r\n"); |
124 | fputs_(string, doc->file); |
124 | fputs_(string, doc->file); |
125 | sprintf(string, "<extensions>\r\n"); fputs_(string, doc->file); |
125 | sprintf(string, "<extensions>\r\n"); fputs_(string, doc->file); |
Line 145... | Line 145... | ||
145 | if(Compass_I2CPort == NCMAG_PORT_EXTERN) sprintf(string, "<MagSensor>external (%i)</MagSensor>\r\n",NCMAG_Orientation); |
145 | if(Compass_I2CPort == NCMAG_PORT_EXTERN) sprintf(string, "<MagSensor>external (%i)</MagSensor>\r\n",NCMAG_Orientation); |
146 | else sprintf(string, "<MagSensor>internal</MagSensor>\r\n");fputs_(string, doc->file); |
146 | else sprintf(string, "<MagSensor>internal</MagSensor>\r\n");fputs_(string, doc->file); |
147 | if(AbsoluteFlyingAltitude) {sprintf(string, "<MaxAltitude>%i</MaxAltitude>\r\n",AbsoluteFlyingAltitude);fputs_(string, doc->file);} |
147 | if(AbsoluteFlyingAltitude) {sprintf(string, "<MaxAltitude>%i</MaxAltitude>\r\n",AbsoluteFlyingAltitude);fputs_(string, doc->file);} |
148 | if(AbsoluteFlyingRange_m) {sprintf(string, "<FlyRange>%i</FlyRange>\r\n",AbsoluteFlyingRange_m);fputs_(string, doc->file);} |
148 | if(AbsoluteFlyingRange_m) {sprintf(string, "<FlyRange>%i</FlyRange>\r\n",AbsoluteFlyingRange_m);fputs_(string, doc->file);} |
149 | if(AutoDescendRange_m) {sprintf(string, "<Descend>%i</Descend>\r\n",AutoDescendRange_m);fputs_(string, doc->file);}; |
149 | if(AutoDescendRange_m) {sprintf(string, "<Descend>%i</Descend>\r\n",AutoDescendRange_m);fputs_(string, doc->file);}; |
- | 150 | ||
- | 151 | ||
- | 152 | if((Parameter.GlobalConfig & FC_CFG_HEADING_HOLD)) {sprintf(string, "<HeadingHold>ON!</HeadingHold>\r\n");fputs_(string, doc->file);} |
|
- | 153 | if((Parameter.GlobalConfig & FC_CFG_KOMPASS_FIX)) {sprintf(string, "<KompassFixedValue>ON!</KompassFixedValue>\r\n");fputs_(string, doc->file);} |
|
- | 154 | if((Parameter.GlobalConfig & FC_CFG_DREHRATEN_BEGRENZER)) {sprintf(string, "<RotationRateLimiter>ON!</RotationRateLimiter>\r\n");fputs_(string, doc->file);} |
|
- | 155 | if(!(Parameter.GlobalConfig & FC_CFG_ACHSENKOPPLUNG_AKTIV)) {sprintf(string, "<AxisCoupling>OFF!</AxisCoupling>\r\n");fputs_(string, doc->file);} |
|
- | 156 | if(!(Parameter.GlobalConfig & FC_CFG_KOMPASS_AKTIV)) {sprintf(string, "<KompassActive>OFF!</KompassActive>\r\n");fputs_(string, doc->file);} |
|
- | 157 | if((Parameter.GlobalConfig3 & CFG3_VARIO_FAILSAFE)) {sprintf(string, "<VarioFailsafe>On</VarioFailsafe>\r\n");fputs_(string, doc->file);} |
|
- | 158 | if((Parameter.ExtraConfig & CFG_3_3V_REFERENCE)) {sprintf(string, "<3.3V_Reference>On</3.3V_Reference>\r\n");fputs_(string, doc->file);} |
|
- | 159 | if((Parameter.ExtraConfig & CFG_IGNORE_MAG_ERR_AT_STARTUP)) {sprintf(string, "<IgnoreMagnetError>ON!</IgnoreMagnetError>\r\n");fputs_(string, doc->file);} |
|
- | 160 | ||
- | 161 | ||
150 | sprintf(string, "<Bytes>%02x,%02x,%02x</Bytes>\r\n",Parameter.GlobalConfig,Parameter.ExtraConfig,Parameter.GlobalConfig3);fputs_(string, doc->file); |
162 | sprintf(string, "<Bytes>%02x,%02x,%02x</Bytes>\r\n",Parameter.GlobalConfig,Parameter.ExtraConfig,Parameter.GlobalConfig3);fputs_(string, doc->file); |
151 | sprintf(string, "</settings>\r\n"); fputs_(string, doc->file); |
163 | sprintf(string, "</settings>\r\n"); fputs_(string, doc->file); |
152 | sprintf(string, "</extensions>\r\n"); fputs_(string, doc->file); |
164 | sprintf(string, "</extensions>\r\n"); fputs_(string, doc->file); |
Line 153... | Line 165... | ||
153 | 165 |