Copter: move responsibility for logging into library
This commit is contained in:
parent
89f43c0318
commit
5d996a289a
@ -310,10 +310,6 @@ void Copter::update_batt_compass(void)
|
|||||||
compass.set_throttle(motors->get_throttle());
|
compass.set_throttle(motors->get_throttle());
|
||||||
compass.set_voltage(battery.voltage());
|
compass.set_voltage(battery.voltage());
|
||||||
compass.read();
|
compass.read();
|
||||||
// log compass information
|
|
||||||
if (should_log(MASK_LOG_COMPASS) && !ahrs.have_ekf_logging()) {
|
|
||||||
logger.Write_Compass();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,6 +137,7 @@ void Copter::init_ardupilot()
|
|||||||
gps.set_log_gps_bit(MASK_LOG_GPS);
|
gps.set_log_gps_bit(MASK_LOG_GPS);
|
||||||
gps.init(serial_manager);
|
gps.init(serial_manager);
|
||||||
|
|
||||||
|
AP::compass().set_log_bit(MASK_LOG_COMPASS);
|
||||||
AP::compass().init();
|
AP::compass().init();
|
||||||
|
|
||||||
#if OPTFLOW == ENABLED
|
#if OPTFLOW == ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user