Plane: Change Compass logging to new DataFlash method that handles instances.
This commit is contained in:
parent
b8822a42b6
commit
395c868727
@ -936,7 +936,7 @@ static void update_compass(void)
|
||||
ahrs.set_compass(&compass);
|
||||
compass.learn_offsets();
|
||||
if (should_log(MASK_LOG_COMPASS)) {
|
||||
Log_Write_Compass();
|
||||
DataFlash.Log_Write_Compass(compass);
|
||||
}
|
||||
} else {
|
||||
ahrs.set_compass(NULL);
|
||||
|
@ -403,23 +403,6 @@ static void Log_Arm_Disarm() {
|
||||
DataFlash.WriteBlock(&pkt, sizeof(pkt));
|
||||
}
|
||||
|
||||
// Write a Compass packet
|
||||
static void Log_Write_Compass()
|
||||
{
|
||||
DataFlash.Log_Write_Compass(compass, 0);
|
||||
|
||||
#if COMPASS_MAX_INSTANCES > 1
|
||||
if (compass.get_count() > 1) {
|
||||
DataFlash.Log_Write_Compass(compass, 1);
|
||||
}
|
||||
#endif
|
||||
#if COMPASS_MAX_INSTANCES > 2
|
||||
if (compass.get_count() > 2) {
|
||||
DataFlash.Log_Write_Compass(compass, 2);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void Log_Write_GPS(uint8_t instance)
|
||||
{
|
||||
DataFlash.Log_Write_GPS(gps, instance, current_loc.alt - ahrs.get_home().alt);
|
||||
@ -512,7 +495,6 @@ static void Log_Write_Cmd(const AP_Mission::Mission_Command &cmd) {}
|
||||
static void Log_Write_Attitude() {}
|
||||
static void Log_Write_Control_Tuning() {}
|
||||
static void Log_Write_Mode(uint8_t mode) {}
|
||||
static void Log_Write_Compass() {}
|
||||
static void Log_Write_GPS(uint8_t instance) {}
|
||||
static void Log_Write_IMU() {}
|
||||
static void Log_Write_RC() {}
|
||||
|
Loading…
Reference in New Issue
Block a user