5
0
mirror of https://github.com/ArduPilot/ardupilot synced 2025-01-03 14:38:30 -04:00

Tracker: tidy compass offset saving

This commit is contained in:
Peter Barker 2019-07-11 14:23:22 +10:00 committed by Randy Mackay
parent f896af6800
commit d99c836360
2 changed files with 1 additions and 8 deletions

View File

@ -37,6 +37,7 @@ const AP_Scheduler::Task Tracker::scheduler_tasks[] = {
SCHED_TASK(update_tracking, 50, 1000),
SCHED_TASK(update_GPS, 10, 4000),
SCHED_TASK(update_compass, 10, 1500),
SCHED_TASK(compass_save, 0.02, 200),
SCHED_TASK_CLASS(AP_BattMonitor, &tracker.battery, read, 10, 1500),
SCHED_TASK_CLASS(AP_Baro, &tracker.barometer, update, 10, 1500),
SCHED_TASK_CLASS(GCS, (GCS*)&tracker._gcs, update_receive, 50, 1700),
@ -95,13 +96,6 @@ void Tracker::one_second_loop()
// updated armed/disarmed status LEDs
update_armed_disarmed();
one_second_counter++;
if (one_second_counter >= 60) {
compass_save();
one_second_counter = 0;
}
// init compass location for declination
init_compass_location();

View File

@ -195,7 +195,6 @@ private:
// setup the var_info table
AP_Param param_loader{var_info};
uint8_t one_second_counter = 0;
bool target_set = false;
bool stationary = true; // are we using the start lat and log?