mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 11:40:35 +08:00
Commander: renamed print_msg_once variable into a more self-explanatory one.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
committed by
Julian Oes
parent
be6f753022
commit
0eb4942f66
@@ -3967,9 +3967,9 @@ void Commander::data_link_check(bool &status_changed)
|
||||
//if avoidance never started
|
||||
if (_datalink_last_heartbeat_avoidance_system == 0
|
||||
&& hrt_elapsed_time(&_datalink_last_heartbeat_avoidance_system) > _oa_boot_timeout.get() * 1_s) {
|
||||
if (!_print_msg_once) {
|
||||
if (!_print_avoidance_msg_once) {
|
||||
mavlink_log_critical(&mavlink_log_pub, "Avoidance system not available!");
|
||||
_print_msg_once = true;
|
||||
_print_avoidance_msg_once = true;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3980,7 +3980,7 @@ void Commander::data_link_check(bool &status_changed)
|
||||
_avoidance_system_lost = true;
|
||||
mavlink_log_critical(&mavlink_log_pub, "Avoidance system lost");
|
||||
status_flags.avoidance_system_valid = false;
|
||||
_print_msg_once = false;
|
||||
_print_avoidance_msg_once = false;
|
||||
}
|
||||
|
||||
//if status changed
|
||||
|
||||
Reference in New Issue
Block a user