mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 05:23:35 +08:00
Sticks: only use stick input if flagged valid
and add a function for just pitch roll stick input
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2020-2023 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -63,7 +63,7 @@ bool Sticks::checkAndUpdateStickInputs()
|
||||
_positions_expo(3) = math::expo_deadzone(_positions(3), _param_mpc_yaw_expo.get(), _param_mpc_hold_dz.get());
|
||||
|
||||
// valid stick inputs are required
|
||||
_input_available = _positions.isAllFinite();
|
||||
_input_available = manual_control_setpoint.valid && _positions.isAllFinite();
|
||||
|
||||
} else {
|
||||
failsafe_flags_s failsafe_flags;
|
||||
|
||||
Reference in New Issue
Block a user