Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
attitude_fw remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Mar 5, 2019
1 parent c66f7f4 commit a85d3a4
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 37 deletions.
2 changes: 1 addition & 1 deletion attitude_fw/ecl_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include <stdio.h>
#include <mathlib/mathlib.h>

ECL_Controller::ECL_Controller(const char *name) :
ECL_Controller::ECL_Controller() :
_last_run(0),
_tc(0.1f),
_k_p(0.0f),
Expand Down
2 changes: 1 addition & 1 deletion attitude_fw/ecl_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct ECL_ControlData {
class ECL_Controller
{
public:
ECL_Controller(const char *name);
ECL_Controller();
virtual ~ECL_Controller() = default;

virtual float control_attitude(const struct ECL_ControlData &ctl_data) = 0;
Expand Down
7 changes: 0 additions & 7 deletions attitude_fw/ecl_pitch_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@
#include <geo/geo.h>
#include <mathlib/mathlib.h>

ECL_PitchController::ECL_PitchController() :
ECL_Controller("pitch"),
_max_rate_neg(0.0f),
_roll_ff(0.0f)
{
}

float ECL_PitchController::control_attitude(const struct ECL_ControlData &ctl_data)
{

Expand Down
6 changes: 3 additions & 3 deletions attitude_fw/ecl_pitch_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ECL_PitchController :
public ECL_Controller
{
public:
ECL_PitchController();
ECL_PitchController() = default;
~ECL_PitchController() = default;

float control_attitude(const struct ECL_ControlData &ctl_data);
Expand Down Expand Up @@ -86,8 +86,8 @@ class ECL_PitchController :
}

protected:
float _max_rate_neg;
float _roll_ff;
float _max_rate_neg{0.0f};
float _roll_ff{0.0f};
};

#endif // ECL_PITCH_CONTROLLER_H
5 changes: 0 additions & 5 deletions attitude_fw/ecl_roll_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
#include <geo/geo.h>
#include <mathlib/mathlib.h>

ECL_RollController::ECL_RollController() :
ECL_Controller("roll")
{
}

float ECL_RollController::control_attitude(const struct ECL_ControlData &ctl_data)
{
/* Do not calculate control signal with bad inputs */
Expand Down
2 changes: 1 addition & 1 deletion attitude_fw/ecl_roll_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ECL_RollController :
public ECL_Controller
{
public:
ECL_RollController();
ECL_RollController() = default;
~ECL_RollController() = default;

float control_attitude(const struct ECL_ControlData &ctl_data);
Expand Down
5 changes: 0 additions & 5 deletions attitude_fw/ecl_wheel_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@

using matrix::wrap_pi;

ECL_WheelController::ECL_WheelController() :
ECL_Controller("wheel")
{
}

float ECL_WheelController::control_bodyrate(const struct ECL_ControlData &ctl_data)
{
/* Do not calculate control signal with bad inputs */
Expand Down
4 changes: 2 additions & 2 deletions attitude_fw/ecl_wheel_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ class ECL_WheelController :
public ECL_Controller
{
public:
ECL_WheelController();
ECL_WheelController() = default;
~ECL_WheelController() = default;

float control_attitude(const struct ECL_ControlData &ctl_data);

float control_bodyrate(const struct ECL_ControlData &ctl_data);

float control_euler_rate(const struct ECL_ControlData &ctl_data) {return 0;}
float control_euler_rate(const struct ECL_ControlData &ctl_data) { (void)ctl_data; return 0; }
};

#endif // ECL_HEADING_CONTROLLER_H
10 changes: 2 additions & 8 deletions attitude_fw/ecl_yaw_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
#include <geo/geo.h>
#include <mathlib/mathlib.h>

ECL_YawController::ECL_YawController() :
ECL_Controller("yaw"),
_coordinated_min_speed(1.0f),
_max_rate(0.0f), /* disable by default */
_coordinated_method(0)
{
}

float ECL_YawController::control_attitude(const struct ECL_ControlData &ctl_data)
{
switch (_coordinated_method) {
Expand Down Expand Up @@ -194,6 +186,8 @@ float ECL_YawController::control_bodyrate(const struct ECL_ControlData &ctl_data

float ECL_YawController::control_attitude_impl_accclosedloop(const struct ECL_ControlData &ctl_data)
{
(void)ctl_data; // unused

/* dont set a rate setpoint */
return 0.0f;
}
Expand Down
8 changes: 4 additions & 4 deletions attitude_fw/ecl_yaw_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ECL_YawController :
public ECL_Controller
{
public:
ECL_YawController();
ECL_YawController() = default;
~ECL_YawController() = default;

float control_attitude(const struct ECL_ControlData &ctl_data);
Expand All @@ -78,10 +78,10 @@ class ECL_YawController :
};

protected:
float _coordinated_min_speed;
float _max_rate;
float _coordinated_min_speed{1.0f};
float _max_rate{0.0f};

int32_t _coordinated_method;
int32_t _coordinated_method{COORD_METHOD_OPEN};

float control_attitude_impl_openloop(const struct ECL_ControlData &ctl_data);

Expand Down

0 comments on commit a85d3a4

Please sign in to comment.