Browse Source

Merge branch 'offboard2' of https://github.com/elikos/Firmware into offboard2

sbg
Benjamin O'Connell-Armand 11 years ago
parent
commit
670d8c91e9
  1. 4
      src/modules/commander/commander.cpp
  2. 6
      src/modules/mc_pos_control/mc_pos_control_main.cpp

4
src/modules/commander/commander.cpp

@ -1834,8 +1834,8 @@ set_control_mode() @@ -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;

6
src/modules/mc_pos_control/mc_pos_control_main.cpp

@ -681,12 +681,12 @@ MulticopterPositionControl::task_main() @@ -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;

Loading…
Cancel
Save