Browse Source

AP_IOMCU: Add binding procedure for DSMx

master
Eugene Shamaev 7 years ago committed by Andrew Tridgell
parent
commit
4d64b86f87
  1. 14
      libraries/AP_IOMCU/AP_IOMCU.cpp
  2. 3
      libraries/AP_IOMCU/AP_IOMCU.h

14
libraries/AP_IOMCU/AP_IOMCU.cpp

@ -784,6 +784,20 @@ void AP_IOMCU::shutdown(void) @@ -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

3
libraries/AP_IOMCU/AP_IOMCU.h

@ -65,6 +65,9 @@ public: @@ -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
*/

Loading…
Cancel
Save