|
|
|
@ -19,6 +19,7 @@
@@ -19,6 +19,7 @@
|
|
|
|
|
#include <AP_RCProtocol/AP_RCProtocol.h> |
|
|
|
|
#include <AP_InternalError/AP_InternalError.h> |
|
|
|
|
#include <AP_Logger/AP_Logger.h> |
|
|
|
|
#include <AP_RCProtocol/AP_RCProtocol.h> |
|
|
|
|
|
|
|
|
|
extern const AP_HAL::HAL &hal; |
|
|
|
|
|
|
|
|
@ -247,6 +248,8 @@ void AP_IOMCU::thread_main(void)
@@ -247,6 +248,8 @@ void AP_IOMCU::thread_main(void)
|
|
|
|
|
pwm_out.failsafe_pwm_sent = set; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
send_rc_protocols(); |
|
|
|
|
} |
|
|
|
|
done_shutdown = true; |
|
|
|
|
} |
|
|
|
@ -769,6 +772,18 @@ void AP_IOMCU::update_safety_options(void)
@@ -769,6 +772,18 @@ void AP_IOMCU::update_safety_options(void)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// update enabled RC protocols mask
|
|
|
|
|
void AP_IOMCU::send_rc_protocols() |
|
|
|
|
{ |
|
|
|
|
const uint32_t v = rc().enabled_protocols(); |
|
|
|
|
if (last_rc_protocols == v) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (write_registers(PAGE_SETUP, PAGE_REG_SETUP_RC_PROTOCOLS, 2, (uint16_t *)&v)) { |
|
|
|
|
last_rc_protocols = v; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
check ROMFS firmware against CRC on IOMCU, and if incorrect then upload new firmware |
|
|
|
|
*/ |
|
|
|
@ -1023,6 +1038,7 @@ void AP_IOMCU::check_iomcu_reset(void)
@@ -1023,6 +1038,7 @@ void AP_IOMCU::check_iomcu_reset(void)
|
|
|
|
|
} |
|
|
|
|
trigger_event(IOEVENT_SET_RATES); |
|
|
|
|
trigger_event(IOEVENT_SET_DEFAULT_RATE); |
|
|
|
|
last_rc_protocols = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|