From 4a5b56c929aa94fa26d409fc90973ca8b7c0e327 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 26 Sep 2018 21:30:59 +0900 Subject: [PATCH] Rover: windvane update called from scheduler at 20hz --- APMrover2/APMrover2.cpp | 2 +- APMrover2/Rover.h | 1 - APMrover2/sensors.cpp | 5 ----- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/APMrover2/APMrover2.cpp b/APMrover2/APMrover2.cpp index 255209c70c..5ec6d7b23c 100644 --- a/APMrover2/APMrover2.cpp +++ b/APMrover2/APMrover2.cpp @@ -53,6 +53,7 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = { SCHED_TASK_CLASS(AP_Baro, &rover.barometer, update, 10, 200), SCHED_TASK_CLASS(AP_Beacon, &rover.g2.beacon, update, 50, 200), SCHED_TASK_CLASS(AP_Proximity, &rover.g2.proximity, update, 50, 200), + SCHED_TASK_CLASS(AP_WindVane, &rover.g2.windvane, update, 20, 100), SCHED_TASK(update_visual_odom, 50, 200), SCHED_TASK(update_wheel_encoder, 50, 200), SCHED_TASK(update_compass, 10, 200), @@ -95,7 +96,6 @@ const AP_Scheduler::Task Rover::scheduler_tasks[] = { #if ADVANCED_FAILSAFE == ENABLED SCHED_TASK(afs_fs_check, 10, 200), #endif - SCHED_TASK(windvane_update, 10, 200), }; void Rover::read_mode_switch() diff --git a/APMrover2/Rover.h b/APMrover2/Rover.h index fb523100ec..bf1ac6993e 100644 --- a/APMrover2/Rover.h +++ b/APMrover2/Rover.h @@ -525,7 +525,6 @@ private: void accel_cal_update(void); void read_rangefinders(void); void init_proximity(); - void windvane_update(); void update_sensor_status_flags(void); // Steering.cpp diff --git a/APMrover2/sensors.cpp b/APMrover2/sensors.cpp index d6473dcc0e..fc953f1ac5 100644 --- a/APMrover2/sensors.cpp +++ b/APMrover2/sensors.cpp @@ -241,11 +241,6 @@ void Rover::init_proximity(void) g2.proximity.set_rangefinder(&rangefinder); } -void Rover::windvane_update() -{ - g2.windvane.update(); -} - // update error mask of sensors and subsystems. The mask // uses the MAV_SYS_STATUS_* values from mavlink. If a bit is set // then it indicates that the sensor or subsystem is present but