forked from Archive/PX4-Autopilot
fixed yaw/yawrate bit masking. fixed navigator overriding offboard setpoint
This commit is contained in:
parent
97a1410ec9
commit
5f6d03099e
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue