From 0eb4942f66cd1032dc5989a25e51f45bb9813406 Mon Sep 17 00:00:00 2001
From: Claudio Micheli <claudio@auterion.com>
Date: Mon, 25 Mar 2019 11:03:55 +0100
Subject: [PATCH] Commander: renamed print_msg_once variable into a more
 self-explanatory one.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
---
 src/modules/commander/Commander.cpp | 6 +++---
 src/modules/commander/Commander.hpp | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp
index 44de0f8f10..9a80de72cb 100644
--- a/src/modules/commander/Commander.cpp
+++ b/src/modules/commander/Commander.cpp
@@ -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
diff --git a/src/modules/commander/Commander.hpp b/src/modules/commander/Commander.hpp
index c0c8509fd6..1c219624b6 100644
--- a/src/modules/commander/Commander.hpp
+++ b/src/modules/commander/Commander.hpp
@@ -203,7 +203,7 @@ private:
 	systemlib::Hysteresis	_auto_disarm_landed{false};
 	systemlib::Hysteresis	_auto_disarm_killed{false};
 
-	bool _print_msg_once{false};
+	bool _print_avoidance_msg_once{false};
 
 	// Subscriptions
 	Subscription<estimator_status_s>		_estimator_status_sub{ORB_ID(estimator_status)};
-- 
GitLab