Fixed CI errors. changed _print_msg_once into private class member.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
This commit is contained in:
Claudio Micheli
2019-03-22 18:52:04 +01:00
committed by Julian Oes
parent e14e5b9d73
commit be6f753022
2 changed files with 5 additions and 5 deletions
+3 -4
View File
@@ -3834,7 +3834,6 @@ bool Commander::preflight_check(bool report)
void Commander::data_link_check(bool &status_changed)
{
bool updated = false;
static bool print_msg_once = false;
orb_check(_telemetry_status_sub, &updated);
@@ -3968,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_msg_once) {
mavlink_log_critical(&mavlink_log_pub, "Avoidance system not available!");
print_msg_once = true;
_print_msg_once = true;
}
}
@@ -3981,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_msg_once = false;
}
//if status changed