diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 0c1d394bf6..fae8ff2e96 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -336,17 +336,28 @@ RC_Channel::norm_output() return ret; } -void RC_Channel::output() +void RC_Channel::output() const { hal.rcout->write(_ch_out, radio_out); } +void RC_Channel::output_trim() const +{ + hal.rcout->write(_ch_out, radio_trim); +} + void RC_Channel::input() { radio_in = hal.rcin->read(_ch_out); } +uint16_t +RC_Channel::read() const +{ + return hal.rcin->read(_ch_out); +} + void RC_Channel::enable_out() { diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index 2a9d9f0513..21cdff84cd 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -95,7 +95,9 @@ public: int16_t pwm_to_range_dz(uint16_t dead_zone); int16_t range_to_pwm(); - void output(); + void output() const; + void output_trim() const; + uint16_t read() const; void input(); void enable_out();