diff --git a/ArduCopter/ArduCopter.cpp b/ArduCopter/ArduCopter.cpp index e2c8d815b1..947a1214f7 100644 --- a/ArduCopter/ArduCopter.cpp +++ b/ArduCopter/ArduCopter.cpp @@ -90,7 +90,7 @@ const AP_Scheduler::Task Copter::scheduler_tasks[] = { SCHED_TASK_CLASS(OpticalFlow, &copter.optflow, update, 200, 160), #endif SCHED_TASK(update_batt_compass, 10, 120), - SCHED_TASK(read_aux_all, 10, 50), + SCHED_TASK_CLASS(RC_Channels, (RC_Channels*)&copter.g2.rc_channels, read_aux_all, 10, 50), SCHED_TASK(arm_motors_check, 10, 50), #if TOY_MODE_ENABLED == ENABLED SCHED_TASK_CLASS(ToyMode, &copter.g2.toy_mode, update, 10, 50), @@ -198,12 +198,6 @@ const AP_Scheduler::Task Copter::scheduler_tasks[] = { #endif }; -void Copter::read_aux_all() -{ - copter.g2.rc_channels.read_aux_all(); -} - - constexpr int8_t Copter::_failsafe_priorities[7]; void Copter::setup() diff --git a/ArduCopter/Copter.h b/ArduCopter/Copter.h index 4cdd735a2f..557d5208c6 100644 --- a/ArduCopter/Copter.h +++ b/ArduCopter/Copter.h @@ -633,7 +633,6 @@ private: void rc_loop(); void throttle_loop(); void update_batt_compass(void); - void read_aux_all(void); void fourhundred_hz_logging(); void ten_hz_logging_loop(); void twentyfive_hz_logging(); diff --git a/ArduCopter/RC_Channel.h b/ArduCopter/RC_Channel.h index 52a52d4758..2e9cf78e9f 100644 --- a/ArduCopter/RC_Channel.h +++ b/ArduCopter/RC_Channel.h @@ -27,11 +27,6 @@ class RC_Channels_Copter : public RC_Channels { public: - // this must be implemented for the AP_Scheduler functor to work: - void read_aux_all() override { - RC_Channels::read_aux_all(); - } - bool has_valid_input() const override; RC_Channel_Copter obj_channels[NUM_RC_CHANNELS];