diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 3de5f72684ed5829e2c081c7a70d7f73d070143f..4c801285ed77f6993fdf9854917d8bb5199e0c68 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -230,7 +230,7 @@ RC_Channel::calc_pwm(void) used for thr_mid in copter */ int16_t -RC_Channel::get_control_mid() { +RC_Channel::get_control_mid() const { if (_type == RC_CHANNEL_TYPE_RANGE) { int16_t r_in = (radio_min.get()+radio_max.get())/2; diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index 16a34c104d3df0d51f8f52bdaf116a167285e450..1224603a1e70dbd0e092810c44c42219c42aa967 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -62,7 +62,7 @@ public: uint8_t get_ch_out(void) const { return _ch_out; }; // get the center stick position expressed as a control_in value - int16_t get_control_mid(); + int16_t get_control_mid() const; // read input from APM_RC - create a control_in value void set_pwm(int16_t pwm);