Rover: Change Compass logging to new DataFlash method that handles instances.
This commit is contained in:
parent
395c868727
commit
f796518695
@ -661,7 +661,7 @@ static void update_compass(void)
|
||||
// update offsets
|
||||
compass.learn_offsets();
|
||||
if (should_log(MASK_LOG_COMPASS)) {
|
||||
Log_Write_Compass();
|
||||
DataFlash.Log_Write_Compass(compass);
|
||||
}
|
||||
} else {
|
||||
ahrs.set_compass(NULL);
|
||||
|
@ -358,24 +358,6 @@ static void Log_Write_Current()
|
||||
DataFlash.Log_Write_Power();
|
||||
}
|
||||
|
||||
// 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_RC(void)
|
||||
{
|
||||
DataFlash.Log_Write_RCIN();
|
||||
@ -449,7 +431,6 @@ static int8_t process_logs(uint8_t argc, const Menu::arg *argv) { return 0; }
|
||||
static void Log_Write_Control_Tuning() {}
|
||||
static void Log_Write_Sonar() {}
|
||||
static void Log_Write_Attitude() {}
|
||||
static void Log_Write_Compass() {}
|
||||
static void start_logging() {}
|
||||
static void Log_Write_RC(void) {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user