AP_IOMCU: fixed crash with BRD_IO_ENABLE=0

This commit is contained in:
Andrew Tridgell 2018-01-13 13:33:28 +11:00
parent 2978649cd4
commit 320ada2002
1 changed files with 3 additions and 1 deletions

View File

@ -444,8 +444,10 @@ void AP_IOMCU::print_debug(void)
// trigger an ioevent
void AP_IOMCU::trigger_event(uint8_t event)
{
if (thread_ctx != nullptr) {
chEvtSignal(thread_ctx, EVENT_MASK(event));
}
}
// get state of safety switch
AP_HAL::Util::safety_state AP_IOMCU::get_safety_switch_state(void) const