mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[commands] Add deadband trigger methods to CommandGenericHID (#7085)
Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f150b36108
commit
968bdf0d06
@@ -230,6 +230,21 @@ class CommandGenericHID {
|
||||
frc::EventLoop* loop =
|
||||
CommandScheduler::GetInstance().GetDefaultButtonLoop()) const;
|
||||
|
||||
/**
|
||||
* Constructs a Trigger instance that is true when the axis magnitude value is
|
||||
* greater than {@code threshold}, attached to the given loop.
|
||||
*
|
||||
* @param axis The axis to read, starting at 0
|
||||
* @param threshold The value above which this trigger should return true.
|
||||
* @param loop the event loop instance to attach the trigger to.
|
||||
* @return a Trigger instance that is true when the axis magnitude value is
|
||||
* greater than the provided threshold.
|
||||
*/
|
||||
Trigger AxisMagnitudeGreaterThan(
|
||||
int axis, double threshold,
|
||||
frc::EventLoop* loop =
|
||||
CommandScheduler::GetInstance().GetDefaultButtonLoop()) const;
|
||||
|
||||
/**
|
||||
* Set the rumble output for the HID.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user