commander properly set boot timestamp

This commit is contained in:
Daniel Agar 2017-07-08 14:01:51 -04:00 committed by Lorenz Meier
parent b804616ad0
commit 1a6a871689
1 changed files with 2 additions and 2 deletions

View File

@ -1686,6 +1686,8 @@ int commander_thread_main(int argc, char *argv[])
checkAirspeed = true;
}
commander_boot_timestamp = hrt_absolute_time();
// Run preflight check
int32_t rc_in_off = 0;
bool hotplug_timeout = hrt_elapsed_time(&commander_boot_timestamp) > HOTPLUG_SENS_TIMEOUT;
@ -1722,8 +1724,6 @@ int commander_thread_main(int argc, char *argv[])
param_get(_param_rc_arm_hyst, &rc_arm_hyst);
rc_arm_hyst *= COMMANDER_MONITORING_LOOPSPERMSEC;
commander_boot_timestamp = hrt_absolute_time();
transition_result_t arming_ret;
int32_t datalink_loss_act = 0;