From 80de3f48c890b100633f83d157ab58eaf9180ed0 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Fri, 16 Feb 2018 18:15:25 -0500 Subject: [PATCH] fw_att_control remove debug code --- .../fw_att_control/fw_att_control_main.cpp | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/modules/fw_att_control/fw_att_control_main.cpp b/src/modules/fw_att_control/fw_att_control_main.cpp index 8a4dff9a16..9c1e780b51 100644 --- a/src/modules/fw_att_control/fw_att_control_main.cpp +++ b/src/modules/fw_att_control/fw_att_control_main.cpp @@ -150,8 +150,6 @@ private: perf_counter_t _nonfinite_input_perf; /**< performance counter for non finite input */ perf_counter_t _nonfinite_output_perf; /**< performance counter for non finite output */ - bool _debug; /**< if set to true, print debug output */ - float _flaps_applied; float _flaperons_applied; @@ -358,7 +356,6 @@ FixedwingAttitudeControl::FixedwingAttitudeControl() : _nonfinite_input_perf(perf_alloc(PC_COUNT, "fwa_nani")), _nonfinite_output_perf(perf_alloc(PC_COUNT, "fwa_nano")), /* states */ - _debug(false), _flaps_applied(0), _flaperons_applied(0), _roll(0.0f), @@ -1004,10 +1001,6 @@ void FixedwingAttitudeControl::run() if (!PX4_ISFINITE(roll_u)) { _roll_ctrl.reset_integrator(); perf_count(_nonfinite_output_perf); - - if (_debug && loop_counter % 10 == 0) { - warnx("roll_u %.4f", (double)roll_u); - } } float pitch_u = _pitch_ctrl.control_euler_rate(control_input); @@ -1017,21 +1010,6 @@ void FixedwingAttitudeControl::run() if (!PX4_ISFINITE(pitch_u)) { _pitch_ctrl.reset_integrator(); perf_count(_nonfinite_output_perf); - - if (_debug && loop_counter % 10 == 0) { - warnx("pitch_u %.4f, _yaw_ctrl.get_desired_rate() %.4f," - " airspeed %.4f, airspeed_scaling %.4f," - " roll_sp %.4f, pitch_sp %.4f," - " _roll_ctrl.get_desired_rate() %.4f," - " _pitch_ctrl.get_desired_rate() %.4f" - " att_sp.roll_body %.4f", - (double)pitch_u, (double)_yaw_ctrl.get_desired_rate(), - (double)airspeed, (double)airspeed_scaling, - (double)roll_sp, (double)pitch_sp, - (double)_roll_ctrl.get_desired_rate(), - (double)_pitch_ctrl.get_desired_rate(), - (double)_att_sp.roll_body); - } } float yaw_u = 0.0f; @@ -1055,10 +1033,6 @@ void FixedwingAttitudeControl::run() _yaw_ctrl.reset_integrator(); _wheel_ctrl.reset_integrator(); perf_count(_nonfinite_output_perf); - - if (_debug && loop_counter % 10 == 0) { - warnx("yaw_u %.4f", (double)yaw_u); - } } /* throttle passed through if it is finite and if no engine failure was detected */ @@ -1071,19 +1045,8 @@ void FixedwingAttitudeControl::run() _actuators.control[actuator_controls_s::INDEX_THROTTLE] *= _battery_status.scale; } - - if (!PX4_ISFINITE(throttle_sp)) { - if (_debug && loop_counter % 10 == 0) { - warnx("throttle_sp %.4f", (double)throttle_sp); - } - } - } else { perf_count(_nonfinite_input_perf); - - if (_debug && loop_counter % 10 == 0) { - warnx("Non-finite setpoint roll_sp: %.4f, pitch_sp %.4f", (double)roll_sp, (double)pitch_sp); - } } } else {