mirror of https://github.com/ArduPilot/ardupilot
AP_Baro: Fix timestamp wrapping
This commit is contained in:
parent
dd3373a489
commit
5b9fc1b146
|
@ -318,7 +318,7 @@ bool AP_Baro_BMP085::_data_ready()
|
|||
|
||||
// No EOC pin: use time from last read instead.
|
||||
if (_state == 0) {
|
||||
return AP_HAL::millis() > _last_temp_read_command_time + 5;
|
||||
return AP_HAL::millis() - _last_temp_read_command_time > 5u;
|
||||
}
|
||||
|
||||
uint32_t conversion_time_msec;
|
||||
|
@ -339,5 +339,5 @@ bool AP_Baro_BMP085::_data_ready()
|
|||
break;
|
||||
}
|
||||
|
||||
return AP_HAL::millis() > _last_press_read_command_time + conversion_time_msec;
|
||||
return AP_HAL::millis() - _last_press_read_command_time > conversion_time_msec;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue