Rover: Change Compass logging to new DataFlash method that handles instances.

This commit is contained in:
Robert Lefebvre 2015-01-16 17:42:14 -05:00 committed by Randy Mackay
parent 395c868727
commit f796518695
2 changed files with 1 additions and 20 deletions

View File

@ -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);

View File

@ -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) {}