aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2015-02-22 13:49:02 +0100
committerThomas Gubler <thomasgubler@gmail.com>2015-02-24 20:33:32 +0100
commit5d2b78abeff771644293c732f3bee9bf6bc60e44 (patch)
tree6bac43e20b503161d187e5a7f490d0b9d2ff3adb /src/modules
parent61398f5c03ad8c894b4c3933adb0272dd9c7d8e6 (diff)
downloadpx4-firmware-5d2b78abeff771644293c732f3bee9bf6bc60e44.tar.gz
px4-firmware-5d2b78abeff771644293c732f3bee9bf6bc60e44.tar.bz2
px4-firmware-5d2b78abeff771644293c732f3bee9bf6bc60e44.zip
Revert "multiplat pos ctrl: also set yaw sp in manual modes"
This reverts commit c0f1d841afd7f2e6aae83b705f25a21727fb184e.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/mc_pos_control_multiplatform/mc_pos_control.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/modules/mc_pos_control_multiplatform/mc_pos_control.cpp b/src/modules/mc_pos_control_multiplatform/mc_pos_control.cpp
index 303123202..e649c28a5 100644
--- a/src/modules/mc_pos_control_multiplatform/mc_pos_control.cpp
+++ b/src/modules/mc_pos_control_multiplatform/mc_pos_control.cpp
@@ -300,22 +300,6 @@ MulticopterPositionControl::control_manual(float dt)
_sp_move_rate /= sp_move_norm;
}
- /* move yaw setpoint */
- //XXX hardcoded hack until #1741 is in/ported (the values stem
- //from default param values, see how yaw setpoint is moved in the attitude controller)
- float yaw_sp_move_rate = _manual_control_sp->data().r * 120.0f * M_DEG_TO_RAD_F;
- _att_sp_msg.data().yaw_body = _wrap_pi(
- _att_sp_msg.data().yaw_body + yaw_sp_move_rate * dt);
- float yaw_offs_max = 120.0f * M_DEG_TO_RAD_F / 2.0f;
- float yaw_offs = _wrap_pi(_att_sp_msg.data().yaw_body - _att->data().yaw);
-
- if (yaw_offs < -yaw_offs_max) {
- _att_sp_msg.data().yaw_body = _wrap_pi(_att->data().yaw - yaw_offs_max);
-
- } else if (yaw_offs > yaw_offs_max) {
- _att_sp_msg.data().yaw_body = _wrap_pi(_att->data().yaw + yaw_offs_max);
- }
-
/* _sp_move_rate scaled to 0..1, scale it to max speed and rotate around yaw */
math::Matrix<3, 3> R_yaw_sp;
R_yaw_sp.from_euler(0.0f, 0.0f, _att_sp_msg.data().yaw_body);
@@ -643,7 +627,8 @@ void MulticopterPositionControl::handle_vehicle_attitude(const px4_vehicle_atti
_att_sp_msg.data().R_valid = true;
_att_sp_msg.data().roll_body = 0.0f;
- // _att_sp_msg.data().yaw_body = _att->data().yaw;
+ _att_sp_msg.data().pitch_body = 0.0f;
+ _att_sp_msg.data().yaw_body = _att->data().yaw;
_att_sp_msg.data().thrust = 0.0f;
_att_sp_msg.data().timestamp = get_time_micros();