|
|
|
@ -79,6 +79,7 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = {
@@ -79,6 +79,7 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = {
|
|
|
|
|
SCHED_TASK_CLASS(AP_Notify, &rover.notify, update, 50, 300), |
|
|
|
|
SCHED_TASK(one_second_loop, 1, 1500), |
|
|
|
|
SCHED_TASK(compass_cal_update, 50, 200), |
|
|
|
|
SCHED_TASK(compass_save, 0.1, 200), |
|
|
|
|
SCHED_TASK(accel_cal_update, 10, 200), |
|
|
|
|
#if LOGGING_ENABLED == ENABLED |
|
|
|
|
SCHED_TASK_CLASS(DataFlash_Class, &rover.DataFlash, periodic_tasks, 50, 300), |
|
|
|
@ -273,18 +274,6 @@ void Rover::one_second_loop(void)
@@ -273,18 +274,6 @@ void Rover::one_second_loop(void)
|
|
|
|
|
// cope with changes to mavlink system ID
|
|
|
|
|
mavlink_system.sysid = g.sysid_this_mav; |
|
|
|
|
|
|
|
|
|
static uint8_t counter; |
|
|
|
|
|
|
|
|
|
counter++; |
|
|
|
|
|
|
|
|
|
// save compass offsets once a minute
|
|
|
|
|
if (counter >= 60) { |
|
|
|
|
if (g.compass_enabled) { |
|
|
|
|
compass.save_offsets(); |
|
|
|
|
} |
|
|
|
|
counter = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// update home position if not soft armed and gps position has
|
|
|
|
|
// changed. Update every 1s at most
|
|
|
|
|
if (!hal.util->get_soft_armed() && |
|
|
|
|