diff options
author | Julian Oes <joes@student.ethz.ch> | 2012-11-19 16:17:52 -0800 |
---|---|---|
committer | Julian Oes <joes@student.ethz.ch> | 2012-11-19 16:17:52 -0800 |
commit | 129e6d73debca5653911867e9db54990c02591bb (patch) | |
tree | d570eb77b836b977ed0a8db59da712435bb12099 /apps/mavlink/mavlink_receiver.c | |
parent | 2652b16d37f2221dc9dabfa1a278651c2931e5ce (diff) | |
download | px4-firmware-129e6d73debca5653911867e9db54990c02591bb.tar.gz px4-firmware-129e6d73debca5653911867e9db54990c02591bb.tar.bz2 px4-firmware-129e6d73debca5653911867e9db54990c02591bb.zip |
Changed yaw position control to yaw speed control for multirotors, tested with ardrone
Diffstat (limited to 'apps/mavlink/mavlink_receiver.c')
-rw-r--r-- | apps/mavlink/mavlink_receiver.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/mavlink/mavlink_receiver.c b/apps/mavlink/mavlink_receiver.c index 3e485274e..4790a673d 100644 --- a/apps/mavlink/mavlink_receiver.c +++ b/apps/mavlink/mavlink_receiver.c @@ -335,6 +335,11 @@ handle_message(mavlink_message_t *msg) struct manual_control_setpoint_s mc; static orb_advert_t mc_pub = 0; + int manual_sub = orb_subscribe(ORB_ID(manual_control_setpoint)); + + /* get a copy first, to prevent altering values that are not sent by the mavlink command */ + orb_copy(ORB_ID(manual_control_setpoint), manual_sub, &mc); + mc.timestamp = rc_hil.timestamp; mc.roll = man.x / 1000.0f; mc.pitch = man.y / 1000.0f; |