Rover: correct compilation when logging is disabled

This commit is contained in:
Peter Barker 2018-04-20 18:57:14 +10:00 committed by Randy Mackay
parent eb026e0a5f
commit 3afe591368
3 changed files with 5 additions and 0 deletions

View File

@ -82,7 +82,9 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = {
SCHED_TASK(one_second_loop, 1, 1500),
SCHED_TASK(compass_cal_update, 50, 200),
SCHED_TASK(accel_cal_update, 10, 200),
#if LOGGING_ENABLED == ENABLED
SCHED_TASK_CLASS(DataFlash_Class, &rover.DataFlash, periodic_tasks, 50, 300),
#endif
SCHED_TASK_CLASS(AP_InertialSensor, &rover.ins, periodic, 50, 200),
SCHED_TASK_CLASS(AP_Scheduler, &rover.scheduler, update_logging, 0.1, 200),
SCHED_TASK_CLASS(AP_Button, &rover.button, update, 5, 200),

View File

@ -345,5 +345,6 @@ void Rover::Log_Write_Error(uint8_t sub_system, uint8_t error_code) {}
void Rover::Log_Write_Steering() {}
void Rover::Log_Write_WheelEncoder() {}
void Rover::Log_Write_Proximity() {}
void Rover::Log_Write_Vehicle_Startup_Messages() {}
#endif // LOGGING_ENABLED

View File

@ -189,10 +189,12 @@ void Rover::startup_ground(void)
mission.init();
// initialise DataFlash library
#if LOGGING_ENABLED == ENABLED
DataFlash.set_mission(&mission);
DataFlash.setVehicle_Startup_Log_Writer(
FUNCTOR_BIND(&rover, &Rover::Log_Write_Vehicle_Startup_Messages, void)
);
#endif
// we don't want writes to the serial port to cause us to pause
// so set serial ports non-blocking once we are ready to drive