AP_HAL_VRBRAIN: attempt to initialize USB while soft-disarmed

This commit is contained in:
Jonathan Challinger 2015-01-28 15:58:01 -08:00 committed by Andrew Tridgell
parent e908fcafb1
commit 59cf1c29ff
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ void VRBRAINUARTDriver::try_initialise(void)
return; return;
} }
_last_initialise_attempt_ms = hal.scheduler->millis(); _last_initialise_attempt_ms = hal.scheduler->millis();
if (hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_ARMED) { if (hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_ARMED || !hal.util->get_soft_armed()) {
begin(0); begin(0);
} }
} }