Rev 486 | Rev 510 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 486 | Rev 489 | ||
---|---|---|---|
Line 108... | Line 108... | ||
108 | if(doc->file != NULL) // could the file be opened? |
108 | if(doc->file != NULL) // could the file be opened? |
109 | { |
109 | { |
110 | retvalue = 1; // the document could be created on the drive. |
110 | retvalue = 1; // the document could be created on the drive. |
111 | doc->state = GPX_DOC_OPENED; // change document state to opened. At next a placemark has to be opened. |
111 | doc->state = GPX_DOC_OPENED; // change document state to opened. At next a placemark has to be opened. |
112 | fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document. |
112 | fwrite_((void*)GPX_DOCUMENT_HEADER1, sizeof(GPX_DOCUMENT_HEADER1)-1,1,doc->file);// write the gpx-header to the document. |
113 | sprintf(string, "<desc>FC HW:%d.%d SW:%d.%02d%c + NC HW:%d.%d SW:%d.%02d%c</desc>\r\n", (FC_Version.Hardware&0x7f) /10,(FC_Version.Hardware&0x7f)%10, FC_Version.Major, FC_Version.Minor, 'a'+FC_Version.Patch, Version_HW/10, Version_HW%10, VERSION_MAJOR, VERSION_MINOR, 'a'+ VERSION_PATCH); |
113 | sprintf(string, "<desc>FC HW:%d.%d SW:%d.%02d%c + NC HW:%d.%d SW:%d.%02d%c</desc>\r\n", (FC_Version.Hardware & 0x7F)/10,(FC_Version.Hardware & 0x7F)%10, FC_Version.Major, FC_Version.Minor, 'a'+FC_Version.Patch, Version_HW/10, Version_HW%10, VERSION_MAJOR, VERSION_MINOR, 'a'+ VERSION_PATCH); |
114 | fputs_(string, doc->file); |
114 | fputs_(string, doc->file); |
115 | fwrite_((void*)GPX_DOCUMENT_HEADER2, sizeof(GPX_DOCUMENT_HEADER2)-1,1,doc->file);// write the gpx-header to the document. |
115 | fwrite_((void*)GPX_DOCUMENT_HEADER2, sizeof(GPX_DOCUMENT_HEADER2)-1,1,doc->file);// write the gpx-header to the document. |
116 | } |
116 | } |
117 | Logging_FCStatusFlags1 = 0; |
117 | Logging_FCStatusFlags1 = 0; |
118 | Logging_FCStatusFlags2 = 0; |
118 | Logging_FCStatusFlags2 = 0; |
Line 271... | Line 271... | ||
271 | } |
271 | } |
272 | } |
272 | } |
273 | return(retvalue); |
273 | return(retvalue); |
274 | } |
274 | } |
Line 275... | Line -... | ||
275 | - | ||
276 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
- | |
277 | // + extended Current measurement -> 200 = 20A 201 = 21A 255 = 75A (20+55) |
- | |
278 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
- | |
279 | unsigned int BL3_Current(unsigned char who) // in 0,1A |
- | |
280 | { |
- | |
281 | if(Motor[who].Current <= 200) return((unsigned int) Motor[who].Current); |
- | |
282 | else |
- | |
283 | { |
- | |
284 | if(Motor_Version[who] & MOTOR_STATE_BL30) return(200 + 10 * (unsigned int) (Motor[who].Current-200)); |
- | |
285 | else return((unsigned int) Motor[who].Current); |
- | |
286 | } |
- | |
287 | } |
- | |
288 | - | ||
289 | 275 | ||
290 | //________________________________________________________________________________________________________________________________________ |
276 | //________________________________________________________________________________________________________________________________________ |
291 | // Function: u8 GPX_TrackSegementAddPoint(GPS_Pos_t * pGPS_Position ,GPX_Document_t *doc); |
277 | // Function: u8 GPX_TrackSegementAddPoint(GPS_Pos_t * pGPS_Position ,GPX_Document_t *doc); |
292 | // |
278 | // |
293 | // Description: This function adds a pointof a track segement to the specified document. |
279 | // Description: This function adds a pointof a track segement to the specified document. |