commander: rephrase or change message importance for some errors/warnings that happen often

This commit is contained in:
daniele
2020-07-13 10:34:17 -04:00
committed by Daniel Agar
parent 0c376ed518
commit be043d24a0
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -2035,14 +2035,14 @@ Commander::run()
if (_manual_control_setpoint.kill_switch == manual_control_setpoint_s::SWITCH_POS_ON) { if (_manual_control_setpoint.kill_switch == manual_control_setpoint_s::SWITCH_POS_ON) {
/* set lockdown flag */ /* set lockdown flag */
if (!armed.manual_lockdown) { if (!armed.manual_lockdown) {
mavlink_log_emergency(&mavlink_log_pub, "Manual kill-switch engaged"); mavlink_and_console_log_info(&mavlink_log_pub, "Manual kill-switch engaged");
_status_changed = true; _status_changed = true;
armed.manual_lockdown = true; armed.manual_lockdown = true;
} }
} else if (_manual_control_setpoint.kill_switch == manual_control_setpoint_s::SWITCH_POS_OFF) { } else if (_manual_control_setpoint.kill_switch == manual_control_setpoint_s::SWITCH_POS_OFF) {
if (armed.manual_lockdown) { if (armed.manual_lockdown) {
mavlink_log_emergency(&mavlink_log_pub, "Manual kill-switch disengaged"); mavlink_and_console_log_info(&mavlink_log_pub, "Manual kill-switch disengaged");
_status_changed = true; _status_changed = true;
armed.manual_lockdown = false; armed.manual_lockdown = false;
} }
@@ -3774,7 +3774,7 @@ void Commander::data_link_check()
status.data_link_lost = true; status.data_link_lost = true;
status.data_link_lost_counter++; status.data_link_lost_counter++;
mavlink_log_critical(&mavlink_log_pub, "Data link lost"); mavlink_log_critical(&mavlink_log_pub, "Connection to ground station lost");
_status_changed = true; _status_changed = true;
} }
@@ -3785,7 +3785,7 @@ void Commander::data_link_check()
&& (hrt_elapsed_time(&_datalink_last_heartbeat_onboard_controller) > 5_s) && (hrt_elapsed_time(&_datalink_last_heartbeat_onboard_controller) > 5_s)
&& !_onboard_controller_lost) { && !_onboard_controller_lost) {
mavlink_log_critical(&mavlink_log_pub, "Onboard controller lost"); mavlink_log_critical(&mavlink_log_pub, "Connection to mission computer lost");
_onboard_controller_lost = true; _onboard_controller_lost = true;
_status_changed = true; _status_changed = true;
} }
@@ -49,7 +49,7 @@
#include "state_machine_helper.h" #include "state_machine_helper.h"
#include "commander_helper.h" #include "commander_helper.h"
static constexpr const char reason_no_rc[] = "no RC"; static constexpr const char reason_no_rc[] = "No manual control stick input";
static constexpr const char reason_no_offboard[] = "no offboard"; static constexpr const char reason_no_offboard[] = "no offboard";
static constexpr const char reason_no_rc_and_no_offboard[] = "no RC and no offboard"; static constexpr const char reason_no_rc_and_no_offboard[] = "no RC and no offboard";
static constexpr const char reason_no_local_position[] = "no local position"; static constexpr const char reason_no_local_position[] = "no local position";