mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 16:56:25 +08:00
commander: update vehicle_status with at least 2Hz
So we're sure it's logged.
This commit is contained in:
@@ -2356,8 +2356,8 @@ Commander::run()
|
||||
_failsafe_old = status.failsafe;
|
||||
}
|
||||
|
||||
/* publish states (armed, control_mode, vehicle_status, commander_state, vehicle_status_flags) at 1 Hz or immediately when changed */
|
||||
if (hrt_elapsed_time(&status.timestamp) >= 1_s || _status_changed || nav_state_changed) {
|
||||
/* publish states (armed, control_mode, vehicle_status, commander_state, vehicle_status_flags) at 2 Hz or immediately when changed */
|
||||
if (hrt_elapsed_time(&status.timestamp) >= 500_ms || _status_changed || nav_state_changed) {
|
||||
|
||||
update_control_mode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user