diff --git a/libraries/AP_HAL_PX4/RCOutput.cpp b/libraries/AP_HAL_PX4/RCOutput.cpp index c8056da655..6a73dae03e 100644 --- a/libraries/AP_HAL_PX4/RCOutput.cpp +++ b/libraries/AP_HAL_PX4/RCOutput.cpp @@ -285,6 +285,22 @@ void PX4RCOutput::read(uint16_t* period_us, uint8_t len) } } +uint16_t PX4RCOutput::read_last_sent(uint8_t ch) +{ + if (ch >= PX4_NUM_OUTPUT_CHANNELS) { + return 0; + } + + return _period[ch]; +} + +void PX4RCOutput::read_last_sent(uint16_t* period_us, uint8_t len) +{ + for (uint8_t i=0; i