From d402c41c0e4e2509907c06d1b1a7b64adc3b4547 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Sat, 27 Apr 2024 08:44:31 +0100 Subject: [PATCH] AP_IOMCU: allow up to 16 channels of servo data to be sent to the iomcu --- libraries/AP_IOMCU/AP_IOMCU.cpp | 4 ++-- libraries/AP_IOMCU/AP_IOMCU.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/AP_IOMCU/AP_IOMCU.cpp b/libraries/AP_IOMCU/AP_IOMCU.cpp index 73f283532f2b99..0d545bd78a7776 100644 --- a/libraries/AP_IOMCU/AP_IOMCU.cpp +++ b/libraries/AP_IOMCU/AP_IOMCU.cpp @@ -791,7 +791,7 @@ bool AP_IOMCU::modify_register(uint8_t page, uint8_t offset, uint16_t clearbits, void AP_IOMCU::write_channel(uint8_t chan, uint16_t pwm) { - if (chan >= IOMCU_MAX_CHANNELS) { + if (chan >= IOMCU_MAX_RC_CHANNELS) { // could be SBUS out return; } if (chan >= pwm_out.num_channels) { @@ -1112,7 +1112,7 @@ bool AP_IOMCU::check_crc(void) void AP_IOMCU::set_failsafe_pwm(uint16_t chmask, uint16_t period_us) { bool changed = false; - for (uint8_t i=0; i