Subversion Repositories NaviCtrl

Rev

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

Rev 482 Rev 483
Line 271... Line 271...
271
                }
271
                }
272
        }
272
        }
273
        return(retvalue);
273
        return(retvalue);
274
}
274
}
Line -... Line 275...
-
 
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
 
275
 
289
 
276
//________________________________________________________________________________________________________________________________________
290
//________________________________________________________________________________________________________________________________________
277
// Function:    u8 GPX_TrackSegementAddPoint(GPS_Pos_t * pGPS_Position ,GPX_Document_t *doc);
291
// Function:    u8 GPX_TrackSegementAddPoint(GPS_Pos_t * pGPS_Position ,GPX_Document_t *doc);
278
//
292
//
279
// Description: This function adds a pointof a track segement to the specified document.
293
// Description: This function adds a pointof a track segement to the specified document.
Line 387... Line 401...
387
                                 sprintf(string, "<RCRSSI>%d</RCRSSI>\r\n", FC.RC_RSSI);
401
                                 sprintf(string, "<RCRSSI>%d</RCRSSI>\r\n", FC.RC_RSSI);
388
                                 fputs_(string, doc->file);
402
                                 fputs_(string, doc->file);
389
                                }
403
                                }
390
*/                              // Compassind deg
404
*/                              // Compassind deg
391
                                i16_1 = FromFlightCtrl.GyroHeading / 10;
405
                                i16_1 = FromFlightCtrl.GyroHeading / 10;
392
                                sprintf(string, "<Compass>%03d,%03d,%03d</Compass>\r\n", i16_1,ToFlightCtrl.CompassHeading,GyroCompassCorrected/10);
406
                                sprintf(string, "<Compass>%03d,%03d,%03d</Compass>\r\n", i16_1,ToFlightCtrl.CompassHeading, GyroCompassCorrected/10);
393
                                fputs_(string, doc->file);
407
                                fputs_(string, doc->file);
394
                                // magnetic field 
408
                                // magnetic field 
395
                                sprintf(string, "<MagnetField>%03d</MagnetField>\r\n",(u16) (EarthMagneticFieldFiltered/5));
409
                                sprintf(string, "<MagnetField>%03d</MagnetField>\r\n",(u16) (EarthMagneticFieldFiltered/5));
396
                                fputs_(string, doc->file);
410
                                fputs_(string, doc->file);
397
                                // magnetic inclination & error 
411
                                // magnetic inclination & error