From 1f4b2d1d53c48f8041152dd2c906502062bbad2f Mon Sep 17 00:00:00 2001 From: bresch Date: Mon, 23 Mar 2020 09:49:32 +0100 Subject: [PATCH] Commander: replace deprecated warnx by PX4_WARN --- src/modules/commander/Commander.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 050b20337f..662d8e4e92 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -761,7 +761,7 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_ if (!_lockdown_triggered) { armed_local->lockdown = true; _lockdown_triggered = true; - warnx("forcing lockdown (motors off)"); + PX4_WARN("forcing lockdown (motors off)"); } } else if (cmd.param1 > 0.5f) { @@ -769,12 +769,12 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_ if (!_flight_termination_triggered) { armed_local->force_failsafe = true; _flight_termination_triggered = true; - warnx("forcing failsafe (termination)"); + PX4_WARN("forcing failsafe (termination)"); } if ((int)cmd.param2 <= 0) { /* reset all commanded failure modes */ - warnx("reset all non-flighttermination failsafe commands"); + PX4_WARN("reset all non-flighttermination failsafe commands"); } } else { @@ -784,7 +784,7 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_ _lockdown_triggered = false; _flight_termination_triggered = false; - warnx("disabling failsafe and lockdown"); + PX4_WARN("disabling failsafe and lockdown"); } cmd_result = vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED; @@ -1738,7 +1738,7 @@ Commander::run() } case (geofence_result_s::GF_ACTION_TERMINATE) : { - warnx("Flight termination because of geofence"); + PX4_WARN("Flight termination because of geofence"); mavlink_log_critical(&mavlink_log_pub, "Geofence violation! Flight terminated"); armed.force_failsafe = true; _status_changed = true; @@ -2688,7 +2688,7 @@ Commander::set_main_state_rc(const vehicle_status_s &status_local, bool *changed if (_sp_man.mode_slot != manual_control_setpoint_s::MODE_SLOT_NONE) { if (_sp_man.mode_slot > manual_control_setpoint_s::MODE_SLOT_NUM) { - warnx("m slot overflow"); + PX4_WARN("m slot overflow"); return TRANSITION_DENIED; }