diff options
author | Benjamin O'Connell-Armand <benjamin.oconnell@polymtl.ca> | 2014-06-02 23:11:31 -0400 |
---|---|---|
committer | Benjamin O'Connell-Armand <benjamin.oconnell@polymtl.ca> | 2014-06-02 23:11:31 -0400 |
commit | 1fc859b1b195b587e70e4a8f6fbeb952424d0610 (patch) | |
tree | 8316b7b202a3cbc4ecf54bdf8bd853ea30462934 /src/modules/commander | |
parent | 5c536ae46ec44b75fea745dd79f20b0aef2c8f16 (diff) | |
download | px4-firmware-1fc859b1b195b587e70e4a8f6fbeb952424d0610.tar.gz px4-firmware-1fc859b1b195b587e70e4a8f6fbeb952424d0610.tar.bz2 px4-firmware-1fc859b1b195b587e70e4a8f6fbeb952424d0610.zip |
Added support for postion_control offboard messages in commander.
Diffstat (limited to 'src/modules/commander')
-rw-r--r-- | src/modules/commander/commander.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index 90efd5115..29a5f0b4a 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1809,6 +1809,14 @@ set_control_mode() control_mode.flag_control_offboard_enabled = true; switch (sp_offboard.mode) { + case OFFBOARD_CONTROL_MODE_DIRECT_POSITION: + control_mode.flag_control_rates_enabled = false; + control_mode.flag_control_attitude_enabled = false; + control_mode.flag_control_altitude_enabled = false; + control_mode.flag_control_climb_rate_enabled = false; + control_mode.flag_control_position_enabled = true; + control_mode.flag_control_velocity_enabled = false; + break; case OFFBOARD_CONTROL_MODE_DIRECT_ATTITUDE: control_mode.flag_control_rates_enabled = true; control_mode.flag_control_attitude_enabled = true; |