Fixed HIL state machine issue with reboot.

This commit is contained in:
James Goppert 2013-01-13 17:43:30 -05:00
parent a40f41d216
commit 6d8983e908
1 changed files with 3 additions and 1 deletions

View File

@ -708,7 +708,9 @@ uint8_t update_state_machine_custom_mode_request(int status_pub, struct vehicle_
case SYSTEM_STATE_REBOOT:
printf("try to reboot\n");
if (current_system_state == SYSTEM_STATE_STANDBY || current_system_state == SYSTEM_STATE_PREFLIGHT) {
if (current_system_state == SYSTEM_STATE_STANDBY
|| current_system_state == SYSTEM_STATE_PREFLIGHT
|| current_status->flag_hil_enabled) {
printf("system will reboot\n");
mavlink_log_critical(mavlink_fd, "Rebooting..");
usleep(200000);