forked from Archive/PX4-Autopilot
ManualControl: remove unused variables and renaming
This commit is contained in:
parent
e73e6a490d
commit
af54ac7cdb
|
@ -1,10 +1,6 @@
|
|||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
bool valid
|
||||
px4/manual_control_input chosen_input
|
||||
|
||||
bool valid
|
||||
|
||||
bool arm_gesture
|
||||
bool disarm_gesture
|
||||
|
||||
bool user_override
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/**
|
||||
* @file commander_params.c
|
||||
*
|
||||
* Parameters defined by the sensors task.
|
||||
* Parameters definition for Commander.
|
||||
*
|
||||
* @author Lorenz Meier <lorenz@px4.io>
|
||||
* @author Thomas Gubler <thomas@px4.io>
|
||||
|
|
|
@ -269,20 +269,20 @@ void ManualControl::processStickArming(const manual_control_input_s &input)
|
|||
{
|
||||
// Arm gesture
|
||||
const bool right_stick_centered = (fabsf(input.x) < 0.1f) && (fabsf(input.y) < 0.1f);
|
||||
const bool stick_lower_right = (input.z < 0.1f) && (input.r > 0.9f);
|
||||
const bool left_stick_lower_right = (input.z < 0.1f) && (input.r > 0.9f);
|
||||
|
||||
const bool previous_stick_arm_hysteresis = _stick_arm_hysteresis.get_state();
|
||||
_stick_arm_hysteresis.set_state_and_update(stick_lower_right && right_stick_centered, input.timestamp);
|
||||
_stick_arm_hysteresis.set_state_and_update(left_stick_lower_right && right_stick_centered, input.timestamp);
|
||||
|
||||
if (!previous_stick_arm_hysteresis && _stick_arm_hysteresis.get_state()) {
|
||||
sendActionRequest(action_request_s::ACTION_ARM, action_request_s::SOURCE_RC_STICK_GESTURE);
|
||||
}
|
||||
|
||||
// Disarm gesture
|
||||
const bool stick_lower_left = (input.z < 0.1f) && (input.r < -0.9f);
|
||||
const bool left_stick_lower_left = (input.z < 0.1f) && (input.r < -0.9f);
|
||||
|
||||
const bool previous_stick_disarm_hysteresis = _stick_disarm_hysteresis.get_state();
|
||||
_stick_disarm_hysteresis.set_state_and_update(stick_lower_left && right_stick_centered, input.timestamp);
|
||||
_stick_disarm_hysteresis.set_state_and_update(left_stick_lower_left && right_stick_centered, input.timestamp);
|
||||
|
||||
if (!previous_stick_disarm_hysteresis && _stick_disarm_hysteresis.get_state()) {
|
||||
sendActionRequest(action_request_s::ACTION_DISARM, action_request_s::SOURCE_RC_STICK_GESTURE);
|
||||
|
|
|
@ -166,9 +166,7 @@ private:
|
|||
(ParamInt<px4::params::COM_FLTMODE3>) _param_fltmode_3,
|
||||
(ParamInt<px4::params::COM_FLTMODE4>) _param_fltmode_4,
|
||||
(ParamInt<px4::params::COM_FLTMODE5>) _param_fltmode_5,
|
||||
(ParamInt<px4::params::COM_FLTMODE6>) _param_fltmode_6,
|
||||
(ParamInt<px4::params::MAV_COMP_ID>) _param_mav_comp_id,
|
||||
(ParamInt<px4::params::MAV_SYS_ID>) _param_mav_sys_id
|
||||
(ParamInt<px4::params::COM_FLTMODE6>) _param_fltmode_6
|
||||
)
|
||||
};
|
||||
} // namespace manual_control
|
||||
|
|
Loading…
Reference in New Issue