diff --git a/attitude_fw/ecl_controller.cpp b/attitude_fw/ecl_controller.cpp index 7bf4129e48..bb313b22b1 100644 --- a/attitude_fw/ecl_controller.cpp +++ b/attitude_fw/ecl_controller.cpp @@ -63,17 +63,12 @@ ECL_Controller::ECL_Controller(const char *name) : _integrator(0.0f), _rate_error(0.0f), _rate_setpoint(0.0f), - _bodyrate_setpoint(0.0f), - _perf_name() + _bodyrate_setpoint(0.0f) { - /* Init performance counter */ - snprintf(_perf_name, sizeof(_perf_name), "fw att control %s nonfinite input", name); - _nonfinite_input_perf = perf_alloc(PC_COUNT, _perf_name); } ECL_Controller::~ECL_Controller() { - perf_free(_nonfinite_input_perf); } void ECL_Controller::reset_integrator() diff --git a/attitude_fw/ecl_controller.h b/attitude_fw/ecl_controller.h index fed7d1d8fb..9c41222da3 100644 --- a/attitude_fw/ecl_controller.h +++ b/attitude_fw/ecl_controller.h @@ -118,8 +118,5 @@ protected: float _rate_error; float _rate_setpoint; float _bodyrate_setpoint; - perf_counter_t _nonfinite_input_perf; - static const uint8_t _perf_name_max = 40; - char _perf_name[_perf_name_max]; float constrain_airspeed(float airspeed, float minspeed, float maxspeed); }; diff --git a/attitude_fw/ecl_pitch_controller.cpp b/attitude_fw/ecl_pitch_controller.cpp index d691a6c650..05640282ed 100644 --- a/attitude_fw/ecl_pitch_controller.cpp +++ b/attitude_fw/ecl_pitch_controller.cpp @@ -66,7 +66,6 @@ float ECL_PitchController::control_attitude(const struct ECL_ControlData &ctl_da PX4_ISFINITE(ctl_data.roll) && PX4_ISFINITE(ctl_data.pitch) && PX4_ISFINITE(ctl_data.airspeed))) { - perf_count(_nonfinite_input_perf); warnx("not controlling pitch"); return _rate_setpoint; } @@ -102,7 +101,6 @@ float ECL_PitchController::control_bodyrate(const struct ECL_ControlData &ctl_da PX4_ISFINITE(ctl_data.airspeed_min) && PX4_ISFINITE(ctl_data.airspeed_max) && PX4_ISFINITE(ctl_data.scaler))) { - perf_count(_nonfinite_input_perf); return math::constrain(_last_output, -1.0f, 1.0f); } diff --git a/attitude_fw/ecl_roll_controller.cpp b/attitude_fw/ecl_roll_controller.cpp index 3a4c15f6a7..d1c9177c8d 100644 --- a/attitude_fw/ecl_roll_controller.cpp +++ b/attitude_fw/ecl_roll_controller.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013 Estimation and Control Library (ECL). All rights reserved. + * Copyright (c) 2013-2016 Estimation and Control Library (ECL). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -60,7 +60,6 @@ float ECL_RollController::control_attitude(const struct ECL_ControlData &ctl_dat { /* Do not calculate control signal with bad inputs */ if (!(PX4_ISFINITE(ctl_data.roll_setpoint) && PX4_ISFINITE(ctl_data.roll))) { - perf_count(_nonfinite_input_perf); return _rate_setpoint; } @@ -90,7 +89,6 @@ float ECL_RollController::control_bodyrate(const struct ECL_ControlData &ctl_dat PX4_ISFINITE(ctl_data.airspeed_min) && PX4_ISFINITE(ctl_data.airspeed_max) && PX4_ISFINITE(ctl_data.scaler))) { - perf_count(_nonfinite_input_perf); return math::constrain(_last_output, -1.0f, 1.0f); } diff --git a/attitude_fw/ecl_wheel_controller.cpp b/attitude_fw/ecl_wheel_controller.cpp index bdd043ee1c..aa0bdfafd5 100644 --- a/attitude_fw/ecl_wheel_controller.cpp +++ b/attitude_fw/ecl_wheel_controller.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013 Estimation and Control Library (ECL). All rights reserved. + * Copyright (c) 2013-2016 Estimation and Control Library (ECL). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -62,7 +62,6 @@ float ECL_WheelController::control_bodyrate(const struct ECL_ControlData &ctl_da if (!(PX4_ISFINITE(ctl_data.yaw_rate) && PX4_ISFINITE(ctl_data.groundspeed) && PX4_ISFINITE(ctl_data.groundspeed_scaler))) { - perf_count(_nonfinite_input_perf); return math::constrain(_last_output, -1.0f, 1.0f); } @@ -124,7 +123,6 @@ float ECL_WheelController::control_attitude(const struct ECL_ControlData &ctl_da /* Do not calculate control signal with bad inputs */ if (!(PX4_ISFINITE(ctl_data.yaw_setpoint) && PX4_ISFINITE(ctl_data.yaw))) { - perf_count(_nonfinite_input_perf); return _rate_setpoint; } diff --git a/attitude_fw/ecl_wheel_controller.h b/attitude_fw/ecl_wheel_controller.h index f153a8f8f1..6292c81844 100644 --- a/attitude_fw/ecl_wheel_controller.h +++ b/attitude_fw/ecl_wheel_controller.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013 Estimation and Control Library (ECL). All rights reserved. + * Copyright (c) 2013-2016 Estimation and Control Library (ECL). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/attitude_fw/ecl_yaw_controller.cpp b/attitude_fw/ecl_yaw_controller.cpp index 765f460a2a..c0f88dc032 100644 --- a/attitude_fw/ecl_yaw_controller.cpp +++ b/attitude_fw/ecl_yaw_controller.cpp @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013 Estimation and Control Library (ECL). All rights reserved. + * Copyright (c) 2013-2016 Estimation and Control Library (ECL). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -108,7 +108,6 @@ float ECL_YawController::control_attitude_impl_openloop(const struct ECL_Control PX4_ISFINITE(ctl_data.speed_body_w) && PX4_ISFINITE(ctl_data.roll_rate_setpoint) && PX4_ISFINITE(ctl_data.pitch_rate_setpoint))) { - perf_count(_nonfinite_input_perf); return _rate_setpoint; } @@ -160,7 +159,6 @@ float ECL_YawController::control_bodyrate_impl(const struct ECL_ControlData &ctl PX4_ISFINITE(ctl_data.yaw_rate) && PX4_ISFINITE(ctl_data.pitch_rate_setpoint) && PX4_ISFINITE(ctl_data.airspeed_min) && PX4_ISFINITE(ctl_data.airspeed_max) && PX4_ISFINITE(ctl_data.scaler))) { - perf_count(_nonfinite_input_perf); return math::constrain(_last_output, -1.0f, 1.0f); } diff --git a/attitude_fw/ecl_yaw_controller.h b/attitude_fw/ecl_yaw_controller.h index 511b5fd36f..ad246fe000 100644 --- a/attitude_fw/ecl_yaw_controller.h +++ b/attitude_fw/ecl_yaw_controller.h @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2013 Estimation and Control Library (ECL). All rights reserved. + * Copyright (c) 2013-2016 Estimation and Control Library (ECL). All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions