diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-23 23:08:12 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-08-23 23:08:12 +0200 |
commit | c42c28ebf4419e26bf3139250a1830544c18d299 (patch) | |
tree | 911126a071d9cce8f9e6ba7ef6501fff5277a41a /src/modules/mavlink/mavlink_receiver.cpp | |
parent | 6865c1f599423a87b73188638961a734ea71db41 (diff) | |
parent | 5e9b508ea0ec799ab6f8723d114c999beffc347e (diff) | |
download | px4-firmware-c42c28ebf4419e26bf3139250a1830544c18d299.tar.gz px4-firmware-c42c28ebf4419e26bf3139250a1830544c18d299.tar.bz2 px4-firmware-c42c28ebf4419e26bf3139250a1830544c18d299.zip |
Merge branch 'seatbelt_multirotor_new' of github.com:PX4/Firmware into multirotor
Diffstat (limited to 'src/modules/mavlink/mavlink_receiver.cpp')
-rw-r--r-- | src/modules/mavlink/mavlink_receiver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 28f7af33c..eb28af1a1 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -71,6 +71,7 @@ #include <systemlib/err.h> #include <systemlib/airspeed.h> #include <mavlink/mavlink_log.h> +#include <commander/px4_custom_mode.h> __BEGIN_DECLS @@ -196,9 +197,11 @@ handle_message(mavlink_message_t *msg) mavlink_set_mode_t new_mode; mavlink_msg_set_mode_decode(msg, &new_mode); + union px4_custom_mode custom_mode; + custom_mode.data = new_mode.custom_mode; /* Copy the content of mavlink_command_long_t cmd_mavlink into command_t cmd */ vcmd.param1 = new_mode.base_mode; - vcmd.param2 = new_mode.custom_mode; + vcmd.param2 = custom_mode.data_float; vcmd.param3 = 0; vcmd.param4 = 0; vcmd.param5 = 0; |