Sticks: only use stick input if flagged valid

and add a function for just pitch roll stick input
This commit is contained in:
Matthias Grob
2023-03-02 12:06:40 +01:00
parent 1dada5daf4
commit da4644c20a
2 changed files with 12 additions and 10 deletions
@@ -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;