diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-10-17 19:02:57 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-10-17 19:02:57 +0200 |
commit | dff0051568602d60f6b8b3d501a2ea78e98b9d7e (patch) | |
tree | 003d95a4457d17029ded5b8405c3787ac502e4a9 /apps/multirotor_att_control/multirotor_att_control_main.c | |
parent | d1429f266da33aa3355b228adffe56f74a9c3cd1 (diff) | |
download | px4-firmware-dff0051568602d60f6b8b3d501a2ea78e98b9d7e.tar.gz px4-firmware-dff0051568602d60f6b8b3d501a2ea78e98b9d7e.tar.bz2 px4-firmware-dff0051568602d60f6b8b3d501a2ea78e98b9d7e.zip |
Map inputs to the controller we actually want
Diffstat (limited to 'apps/multirotor_att_control/multirotor_att_control_main.c')
-rw-r--r-- | apps/multirotor_att_control/multirotor_att_control_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/multirotor_att_control/multirotor_att_control_main.c b/apps/multirotor_att_control/multirotor_att_control_main.c index 82d4c0f25..dfb778fd0 100644 --- a/apps/multirotor_att_control/multirotor_att_control_main.c +++ b/apps/multirotor_att_control/multirotor_att_control_main.c @@ -195,7 +195,7 @@ mc_thread_main(int argc, char *argv[]) rates_sp.roll = manual.roll; rates_sp.pitch = manual.pitch; - rates_sp.yaw = att.yaw + manual.yaw * 2.0f; + rates_sp.yaw = manual.yaw; rates_sp.thrust = manual.throttle; //printf("rates\n"); rates_sp.timestamp = hrt_absolute_time(); @@ -204,9 +204,7 @@ mc_thread_main(int argc, char *argv[]) if (state.flag_control_attitude_enabled) { att_sp.roll_body = manual.roll; att_sp.pitch_body = manual.pitch; - att_sp.yaw_body = manual.yaw; // XXX Hack, clean up - /* set yaw rate */ - rates_sp.yaw = manual.yaw; + att_sp.yaw_body = att.yaw + manual.yaw * -2.0f; att_sp.thrust = manual.throttle; att_sp.timestamp = hrt_absolute_time(); } |