diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-05-12 09:24:06 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-05-12 09:24:06 +0200 |
commit | de4c4561961562d424e77c4557b51c6166bfd1d2 (patch) | |
tree | a126f45621b39b1e04f244a2c179b3f6532b210e /src | |
parent | 6d9ea86bc9d50d84fcfd8625676e8ff1c53ca1fd (diff) | |
download | px4-firmware-de4c4561961562d424e77c4557b51c6166bfd1d2.tar.gz px4-firmware-de4c4561961562d424e77c4557b51c6166bfd1d2.tar.bz2 px4-firmware-de4c4561961562d424e77c4557b51c6166bfd1d2.zip |
mc att control: use new manual control setpoint variable names
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/mc_att_control/mc_att_control_main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/mc_att_control/mc_att_control_main.cpp b/src/modules/mc_att_control/mc_att_control_main.cpp index 36d95bf06..5f6963ce9 100644 --- a/src/modules/mc_att_control/mc_att_control_main.cpp +++ b/src/modules/mc_att_control/mc_att_control_main.cpp @@ -478,7 +478,7 @@ MulticopterAttitudeControl::control_attitude(float dt) if (!_v_control_mode.flag_control_climb_rate_enabled) { /* pass throttle directly if not in altitude stabilized mode */ - _v_att_sp.thrust = _manual_control_sp.throttle; + _v_att_sp.thrust = _manual_control_sp.z; publish_att_sp = true; } @@ -496,7 +496,7 @@ MulticopterAttitudeControl::control_attitude(float dt) //} } else { /* move yaw setpoint */ - yaw_sp_move_rate = _manual_control_sp.yaw * _params.man_yaw_max; + yaw_sp_move_rate = _manual_control_sp.r * _params.man_yaw_max; _v_att_sp.yaw_body = _wrap_pi(_v_att_sp.yaw_body + yaw_sp_move_rate * dt); _v_att_sp.R_valid = false; publish_att_sp = true; @@ -512,8 +512,8 @@ MulticopterAttitudeControl::control_attitude(float dt) if (!_v_control_mode.flag_control_velocity_enabled) { /* update attitude setpoint if not in position control mode */ - _v_att_sp.roll_body = _manual_control_sp.roll * _params.man_roll_max; - _v_att_sp.pitch_body = -_manual_control_sp.pitch * _params.man_pitch_max; + _v_att_sp.roll_body = _manual_control_sp.y * _params.man_roll_max; + _v_att_sp.pitch_body = -_manual_control_sp.x * _params.man_pitch_max; _v_att_sp.R_valid = false; publish_att_sp = true; } |