diff options
author | Benjamin O'Connell-Armand <benjamin.oconnell@polymtl.ca> | 2014-06-14 15:50:24 -0400 |
---|---|---|
committer | Benjamin O'Connell-Armand <benjamin.oconnell@polymtl.ca> | 2014-06-14 15:50:24 -0400 |
commit | 670d8c91e9e727c3097e3bca1e4bea17a9170245 (patch) | |
tree | f6c0c68f3e4bffdeb8f278c72c5d887f6b5aa580 /src | |
parent | 128ec447ad43d5a25abcbdda6de01ca7ebc681cf (diff) | |
parent | 02653f6cd9dd05c0d6bd5344d6e76fdb29641f33 (diff) | |
download | px4-firmware-670d8c91e9e727c3097e3bca1e4bea17a9170245.tar.gz px4-firmware-670d8c91e9e727c3097e3bca1e4bea17a9170245.tar.bz2 px4-firmware-670d8c91e9e727c3097e3bca1e4bea17a9170245.zip |
Merge branch 'offboard2' of https://github.com/elikos/Firmware into offboard2
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/commander/commander.cpp | 4 | ||||
-rw-r--r-- | src/modules/mc_pos_control/mc_pos_control_main.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 3da43a792..2c36b2e6c 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1834,8 +1834,8 @@ set_control_mode() control_mode.flag_control_velocity_enabled = true; break; case OFFBOARD_CONTROL_MODE_DIRECT_POSITION: - control_mode.flag_control_rates_enabled = true; - control_mode.flag_control_attitude_enabled = true; + control_mode.flag_control_rates_enabled = false; + control_mode.flag_control_attitude_enabled = false; control_mode.flag_control_altitude_enabled = true; control_mode.flag_control_climb_rate_enabled = true; control_mode.flag_control_position_enabled = true; diff --git a/src/modules/mc_pos_control/mc_pos_control_main.cpp b/src/modules/mc_pos_control/mc_pos_control_main.cpp index 86112fa21..35db05499 100644 --- a/src/modules/mc_pos_control/mc_pos_control_main.cpp +++ b/src/modules/mc_pos_control/mc_pos_control_main.cpp @@ -681,12 +681,12 @@ MulticopterPositionControl::task_main() /* Make sure position control is selected i.e. not only velocity control */ if (_control_mode.flag_control_position_enabled) { - _pos_sp(0) = _local_pos_sp.x; - _pos_sp(1) = _local_pos_sp.y; + _pos_sp(0) = _local_pos_sp.x; + _pos_sp(1) = _local_pos_sp.y; } if (_control_mode.flag_control_altitude_enabled) { - _pos_sp(2) = _local_pos_sp.z; + _pos_sp(2) = _local_pos_sp.z; } _att_sp.yaw_body = _local_pos_sp.yaw; |