Rev 869 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 869 | Rev 878 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | #include "camctrl.h" |
75 | #include "camctrl.h" |
76 | #include "ssc.h" |
76 | #include "ssc.h" |
Line 77... | Line 77... | ||
77 | 77 | ||
78 | u16 Check16File; |
78 | u16 Check16File; |
- | 79 | u16 Check16Block; |
|
Line 79... | Line 80... | ||
79 | u16 Check16Block; |
80 | u8 RedundanceWasActive = 0; |
80 | 81 | ||
81 | //________________________________________________________________________________________________________________________________________ |
82 | //________________________________________________________________________________________________________________________________________ |
82 | // Function: GPX_DocumentInit(GPX_Document_t *) |
83 | // Function: GPX_DocumentInit(GPX_Document_t *) |
Line 150... | Line 151... | ||
150 | if(SimulationFlags) { sprintf(string, " SIMULATED"); CheckSumAndWrite(&Check16File,string, doc->file);}; |
151 | if(SimulationFlags) { sprintf(string, " SIMULATED"); CheckSumAndWrite(&Check16File,string, doc->file);}; |
151 | if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE) |
152 | if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE) |
152 | { |
153 | { |
153 | if(IamMaster == SLAVE) sprintf(string, " (SLAVE)"); |
154 | if(IamMaster == SLAVE) sprintf(string, " (SLAVE)"); |
154 | else sprintf(string, " (MASTER)"); |
155 | else sprintf(string, " (MASTER)"); |
- | 156 | CheckSumAndWrite(&Check16File,string, doc->file); |
|
- | 157 | RedundanceWasActive = 1; |
|
155 | } |
158 | } |
- | 159 | else RedundanceWasActive = 0; |
|
156 | sprintf(string, "</desc>\r\n"); |
160 | sprintf(string, "</desc>\r\n"); |
157 | CheckSumAndWrite(&Check16File,string, doc->file); |
161 | CheckSumAndWrite(&Check16File,string, doc->file); |
158 | if(OEM_String[0] == 255) |
162 | if(OEM_String[0] == 255) |
159 | { |
163 | { |
160 | sprintf(string, "<link href=\"http://www.mikrokopter.de\">\r\n<text>MikroKopter</text>\r\n</link>\r\n"); CheckSumAndWrite(&Check16File,string, doc->file); |
164 | sprintf(string, "<link href=\"http://www.mikrokopter.de\">\r\n<text>MikroKopter</text>\r\n</link>\r\n"); CheckSumAndWrite(&Check16File,string, doc->file); |
Line 287... | Line 291... | ||
287 | Logging_FCStatusFlags1 = 0; |
291 | Logging_FCStatusFlags1 = 0; |
288 | Logging_FCStatusFlags2 = 0; |
292 | Logging_FCStatusFlags2 = 0; |
289 | Logged_GPX_Counter = 0; |
293 | Logged_GPX_Counter = 0; |
290 | LogFC_WP_EventChannel = 0; |
294 | LogFC_WP_EventChannel = 0; |
291 | Logging_BL_MinOfMaxPWM = BL_MinOfMaxPWM; |
295 | Logging_BL_MinOfMaxPWM = BL_MinOfMaxPWM; |
- | 296 | if(FC.StatusFlags3 & FC_STATUS3_REDUNDANCE_AKTIVE) RedundanceWasActive = 1; |
|
Line 292... | Line 297... | ||
292 | 297 | ||
Line 293... | Line 298... | ||
293 | Check16Block = Check16File; // init. value for first block |
298 | Check16Block = Check16File; // init. value for first block |
294 | 299 | ||
Line 326... | Line 331... | ||
326 | 331 | ||
327 | case GPX_DOC_OPENED: // close the file on the memorycard |
332 | case GPX_DOC_OPENED: // close the file on the memorycard |
328 | if(doc->file != NULL) |
333 | if(doc->file != NULL) |
329 | { |
334 | { |
330 | sprintf(string, "<!-- FcTemperature:%d.%1d -->\r\n",FC_Temperatur/10,abs(FC_Temperatur)%10); |
335 | sprintf(string, "<!-- FcTemperature:%d.%1d -->\r\n",FC_Temperatur/10,abs(FC_Temperatur)%10); |
Line -... | Line 336... | ||
- | 336 | CheckSumAndWrite(&Check16Block,string, doc->file); |
|
- | 337 | ||
- | 338 | if(RedundanceWasActive) |
|
- | 339 | { |
|
- | 340 | sprintf(string, "<!-- Redundant System: YES -->\r\n"); |
|
- | 341 | CheckSumAndWrite(&Check16Block,string, doc->file); |
|
- | 342 | } |
|
- | 343 | /* else |
|
- | 344 | { |
|
- | 345 | sprintf(string, "<!-- Redundant System: NO -->\r\n"); |
|
331 | fputs_(string, doc->file); |
346 | CheckSumAndWrite(&Check16Block,string, doc->file); |
332 | 347 | } |
|
333 | sprintf(string, "<!-- %d -->\r\n", Check16File); |
348 | */ sprintf(string, "<!-- %d -->\r\n", Check16File); |
Line 334... | Line 349... | ||
334 | fputs_(string, doc->file); |
349 | fputs_(string, doc->file); |
335 | fwrite_((void*)GPX_DOCUMENT_FOOTER, sizeof(GPX_DOCUMENT_FOOTER)-1,1,doc->file); // write the gpx-footer to the document. |
350 | fwrite_((void*)GPX_DOCUMENT_FOOTER, sizeof(GPX_DOCUMENT_FOOTER)-1,1,doc->file); // write the gpx-footer to the document. |