AP_IOMCU: Add binding procedure for DSMx

This commit is contained in:
Eugene Shamaev 2018-08-26 18:06:10 +03:00 committed by Andrew Tridgell
parent 032c5ab707
commit 4d64b86f87
2 changed files with 17 additions and 0 deletions

View File

@ -784,6 +784,20 @@ void AP_IOMCU::shutdown(void)
}
}
/*
request bind on a DSM radio
*/
void AP_IOMCU::bind_dsm(uint8_t mode)
{
if (config.protocol_version != IOMCU_PROTOCOL_VERSION ||
hal.util->get_soft_armed()) {
// only with ChibiOS IO firmware, and disarmed
return;
}
uint16_t reg = mode;
write_registers(PAGE_SETUP, PAGE_REG_SETUP_DSM_BIND, &reg);
}
/*
setup for mixing. This allows fixed wing aircraft to fly in manual
mode if the FMU dies

View File

@ -65,6 +65,9 @@ public:
*/
bool check_rcinput(uint32_t &last_frame_us, uint8_t &num_channels, uint16_t *channels, uint8_t max_channels);
// Do DSM receiver binding
void bind_dsm(uint8_t mode);
/*
get servo rail voltage
*/