mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
commander: periodically republish home position if valid
This commit is contained in:
parent
ff08536247
commit
ffce9885ca
@ -343,4 +343,10 @@ void HomePosition::update(bool set_automatically, bool check_if_changed)
|
||||
setHomePosition();
|
||||
}
|
||||
}
|
||||
|
||||
// periodically republish home position if valid
|
||||
if (home.valid_alt && (hrt_elapsed_time(&home.timestamp) > 5_s)) {
|
||||
_home_position_pub.get().timestamp = hrt_absolute_time();
|
||||
_home_position_pub.update();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user