aboutsummaryrefslogtreecommitdiff
path: root/apps/fixedwing_att_control/fixedwing_att_control_rate.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-01-11 07:44:03 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-01-11 07:44:03 +0100
commitdc100f20201974eeae8743e1184efe6be1e31e6f (patch)
tree438467d1ab1f8280f7e8c372581c0a7f019d2174 /apps/fixedwing_att_control/fixedwing_att_control_rate.c
parent9ab20b11b6a528ef2ae4197e9cd412de52b1d024 (diff)
downloadpx4-firmware-dc100f20201974eeae8743e1184efe6be1e31e6f.tar.gz
px4-firmware-dc100f20201974eeae8743e1184efe6be1e31e6f.tar.bz2
px4-firmware-dc100f20201974eeae8743e1184efe6be1e31e6f.zip
Fixedwing controller code style
Diffstat (limited to 'apps/fixedwing_att_control/fixedwing_att_control_rate.c')
-rw-r--r--apps/fixedwing_att_control/fixedwing_att_control_rate.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/fixedwing_att_control/fixedwing_att_control_rate.c b/apps/fixedwing_att_control/fixedwing_att_control_rate.c
index f3e36c0ec..87b6e925c 100644
--- a/apps/fixedwing_att_control/fixedwing_att_control_rate.c
+++ b/apps/fixedwing_att_control/fixedwing_att_control_rate.c
@@ -157,8 +157,8 @@ static int parameters_update(const struct fw_rate_control_param_handles *h, stru
}
int fixedwing_att_control_rates(const struct vehicle_rates_setpoint_s *rate_sp,
- const float rates[],
- struct actuator_controls_s *actuators)
+ const float rates[],
+ struct actuator_controls_s *actuators)
{
static int counter = 0;
static bool initialized = false;
@@ -174,8 +174,7 @@ int fixedwing_att_control_rates(const struct vehicle_rates_setpoint_s *rate_sp,
const float deltaT = (hrt_absolute_time() - last_run) / 1000000.0f;
last_run = hrt_absolute_time();
- if(!initialized)
- {
+ if (!initialized) {
parameters_init(&h);
parameters_update(&h, &p);
pid_init(&roll_rate_controller, p.rollrate_p, p.rollrate_i, 0, p.rollrate_awu, 1, PID_MODE_DERIVATIV_NONE); // set D part to 0 because the controller layout is with a PI rate controller