diff options
author | Steven Blass <steven.r.blass@gmail.com> | 2014-11-17 19:58:18 -0500 |
---|---|---|
committer | Steven Blass <steven.r.blass@gmail.com> | 2014-11-17 19:58:18 -0500 |
commit | 5f6d03099e07e20abe9cec685fee1244d7c9a0d4 (patch) | |
tree | 4e0bb3835afc03c3c72429ea6d0a755e19bd5bd7 /src | |
parent | 97a1410ec99e880207e4ee6d2a03451c2e11f4cf (diff) | |
download | px4-firmware-5f6d03099e07e20abe9cec685fee1244d7c9a0d4.tar.gz px4-firmware-5f6d03099e07e20abe9cec685fee1244d7c9a0d4.tar.bz2 px4-firmware-5f6d03099e07e20abe9cec685fee1244d7c9a0d4.zip |
fixed yaw/yawrate bit masking. fixed navigator overriding offboard setpoint
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/mavlink/mavlink_receiver.cpp | 4 | ||||
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index bc092c7e9..c0a8d7322 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -540,10 +540,10 @@ MavlinkReceiver::handle_message_set_position_target_local_ned(mavlink_message_t } offboard_control_sp.ignore &= ~(1 << OFB_IGN_BIT_YAW); offboard_control_sp.ignore |= (set_position_target_local_ned.type_mask & (1 << 10)) << - OFB_IGN_BIT_YAW; + (OFB_IGN_BIT_YAW - 10); offboard_control_sp.ignore &= ~(1 << OFB_IGN_BIT_YAWRATE); offboard_control_sp.ignore |= (set_position_target_local_ned.type_mask & (1 << 11)) << - OFB_IGN_BIT_YAWRATE; + (OFB_IGN_BIT_YAWRATE - 11); offboard_control_sp.timestamp = hrt_absolute_time(); diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 10a4ee88f..5e9806499 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -468,9 +468,10 @@ Navigator::task_main() _navigation_mode_array[i]->run(_navigation_mode == _navigation_mode_array[i]); } - /* if nothing is running, set position setpoint triplet invalid */ - if (_navigation_mode == nullptr) { - // TODO publish empty sp only once + /* if nothing is running, set position setpoint triplet invalid once */ + static bool published_once = false; + if (_navigation_mode == nullptr && !published_once) { + published_once = true; _pos_sp_triplet.previous.valid = false; _pos_sp_triplet.current.valid = false; _pos_sp_triplet.next.valid = false; |