AP_HAL_ChibiOS: add iomcu support for reversible mask

check armed state on iomcu before sending dshot packets
This commit is contained in:
Andy Piper authored and Andrew Tridgell committed 2024-09-04 18:34:10 +10:00
1 parent e21e098aa9
commit fc51829b63
2 files changed
+9 -4

No files matched your search

@@ -140,6 +140,12 @@ void RCOutput::set_reversed_mask(uint32_t chanmask) {
// The mask uses servo channel numbering
void RCOutput::set_reversible_mask(uint32_t chanmask) {
_reversible_mask |= chanmask;
#if HAL_WITH_IO_MCU
const uint32_t iomcu_mask = ((1U<<chan_offset)-1);
if (iomcu_dshot && (chanmask & iomcu_mask)) {
iomcu.set_reversible_mask(chanmask & iomcu_mask);
}
#endif
}
// Update the dshot outputs that should be reversible/3D at 1Hz