mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 04:00:36 +08:00
sensor_combined.msg: make timestamps relative
This is needed for the new logger & saves some space as well.
This commit is contained in:
@@ -1788,7 +1788,8 @@ int commander_thread_main(int argc, char *argv[])
|
||||
* vertical separation from other airtraffic the operator has to know when the
|
||||
* barometer is inoperational.
|
||||
* */
|
||||
if (hrt_elapsed_time(&sensors.baro_timestamp) < FAILSAFE_DEFAULT_TIMEOUT) {
|
||||
hrt_abstime baro_timestamp = sensors.timestamp + sensors.baro_timestamp_relative;
|
||||
if (hrt_elapsed_time(&baro_timestamp) < FAILSAFE_DEFAULT_TIMEOUT) {
|
||||
/* handle the case where baro was regained */
|
||||
if (status_flags.barometer_failure) {
|
||||
status_flags.barometer_failure = false;
|
||||
|
||||
Reference in New Issue
Block a user