AP_HAL_ChibiOS: fix safety switch option handling

This commit is contained in:
Randy Mackay 2018-10-04 11:16:26 +09:00
parent 4a1348a432
commit e8e82e99d3
1 changed files with 2 additions and 2 deletions

View File

@ -1415,11 +1415,11 @@ void RCOutput::safety_update(void)
safety_pressed = false; safety_pressed = false;
} }
if (safety_state==AP_HAL::Util::SAFETY_DISARMED && if (safety_state==AP_HAL::Util::SAFETY_DISARMED &&
!(safety_options & AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_ON)) { !(safety_options & AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_OFF)) {
safety_pressed = false; safety_pressed = false;
} }
if (safety_state==AP_HAL::Util::SAFETY_ARMED && if (safety_state==AP_HAL::Util::SAFETY_ARMED &&
!(safety_options & AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_OFF)) { !(safety_options & AP_BoardConfig::BOARD_SAFETY_OPTION_BUTTON_ACTIVE_SAFETY_ON)) {
safety_pressed = false; safety_pressed = false;
} }
if (safety_pressed) { if (safety_pressed) {