Subversion Repositories NaviCtrl

Rev

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

Rev 468 Rev 471
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 404... Line 418...
404
                                sprintf(string, "<RollAngle>%03d</RollAngle>\r\n", NaviData.AngleRoll);
418
                                sprintf(string, "<RollAngle>%03d</RollAngle>\r\n", NaviData.AngleRoll);
405
                                fputs_(string, doc->file);
419
                                fputs_(string, doc->file);
406
                           break;
420
                           break;
407
                           case 5:
421
                           case 5:
408
                                // BL Information
422
                                // BL Information
409
                                sprintf(string, "<MotorCurrent>%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d</MotorCurrent>\r\n",Motor[0].Current,Motor[1].Current,Motor[2].Current,Motor[3].Current,Motor[4].Current,Motor[5].Current,Motor[6].Current,Motor[7].Current,Motor[8].Current,Motor[9].Current,Motor[10].Current,Motor[11].Current);
423
//                              sprintf(string, "<MotorCurrent>%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d</MotorCurrent>\r\n",Motor[0].Current,Motor[1].Current,Motor[2].Current,Motor[3].Current,Motor[4].Current,Motor[5].Current,Motor[6].Current,Motor[7].Current,Motor[8].Current,Motor[9].Current,Motor[10].Current,Motor[11].Current);
-
 
424
                                sprintf(string, "<MotorCurrent>%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d</MotorCurrent>\r\n",BL3_Current(0),BL3_Current(1),BL3_Current(2),BL3_Current(3),BL3_Current(4),BL3_Current(5),BL3_Current(6),BL3_Current(7),BL3_Current(8),BL3_Current(9),BL3_Current(10),BL3_Current(11));
410
                                fputs_(string, doc->file);
425
                                fputs_(string, doc->file);
411
                                sprintf(string, "<BL_Temperature>%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d</BL_Temperature>\r\n",Motor[0].Temperature,Motor[1].Temperature,Motor[2].Temperature,Motor[3].Temperature,Motor[4].Temperature,Motor[5].Temperature,Motor[6].Temperature,Motor[7].Temperature,Motor[8].Temperature,Motor[9].Temperature,Motor[10].Temperature,Motor[11].Temperature);
426
                                sprintf(string, "<BL_Temperature>%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d</BL_Temperature>\r\n",Motor[0].Temperature,Motor[1].Temperature,Motor[2].Temperature,Motor[3].Temperature,Motor[4].Temperature,Motor[5].Temperature,Motor[6].Temperature,Motor[7].Temperature,Motor[8].Temperature,Motor[9].Temperature,Motor[10].Temperature,Motor[11].Temperature);
412
                                fputs_(string, doc->file);
427
                                fputs_(string, doc->file);
413
                           break;
428
                           break;
414
                           case 6:
429
                           case 6:
Line 470... Line 485...
470
                                sprintf(string, "<RCQuality>%d</RCQuality>\r\n", FC.RC_Quality);
485
                                sprintf(string, "<RCQuality>%d</RCQuality>\r\n", FC.RC_Quality);
471
                                fputs_(string, doc->file);
486
                                fputs_(string, doc->file);
472
                                // Navigation Update speed (in 0.1Hz)
487
                                // Navigation Update speed (in 0.1Hz)
473
//                              sprintf(string, "<NaviUpdate>%d,%d</NaviUpdate>\r\n",FreqGpsProcessedIn5Sec,FreqNewGpsDataIn5Sec);
488
//                              sprintf(string, "<NaviUpdate>%d,%d</NaviUpdate>\r\n",FreqGpsProcessedIn5Sec,FreqNewGpsDataIn5Sec);
474
//                              fputs_(string, doc->file);
489
//                              fputs_(string, doc->file);
475
                                // RC Received Signal Strength Indication
-
 
476
                                // eof extensions
490
                                // eof extensions
477
                                sprintf(string, "</extensions>\r\n");
491
                                sprintf(string, "</extensions>\r\n");
478
                                fputs_(string, doc->file);
492
                                fputs_(string, doc->file);
479
                                sprintf(string, "</trkpt>\r\n");
493
                                sprintf(string, "</trkpt>\r\n");
480
                                fputs_(string, doc->file);
494
                                fputs_(string, doc->file);