Use hrt_elapsed_time() in cases where we can't be sure the timestamp won't change under us.

This commit is contained in:
px4dev
2013-02-24 11:42:34 -08:00
parent 923a7cc505
commit f245d6b1a7
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ void
mixer_tick(void)
{
/* check that we are receiving fresh data from the FMU */
if ((hrt_absolute_time() - system_state.fmu_data_received_time) > FMU_INPUT_DROP_LIMIT_US) {
if (hrt_elapsed_time(&system_state.fmu_data_received_time) > FMU_INPUT_DROP_LIMIT_US) {
/* too long without FMU input, time to go to failsafe */
if (r_status_flags & PX4IO_P_STATUS_FLAGS_FMU_OK) {