Package com.marslib.hmi
Class TelemetryGamepad
java.lang.Object
edu.wpi.first.wpilibj2.command.button.CommandGenericHID
edu.wpi.first.wpilibj2.command.button.CommandXboxController
com.marslib.hmi.TelemetryGamepad
public class TelemetryGamepad
extends edu.wpi.first.wpilibj2.command.button.CommandXboxController
A wrapper for CommandXboxController that dynamically logs string descriptors indicating what
macro is mapped to what button securely to AdvantageKit and NetworkTables. This inherently allows
Dashboards to visually represent controller bindings safely.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.wpilibj2.command.button.TriggerbindOnFalse(edu.wpi.first.wpilibj2.command.button.Trigger trigger, String buttonName, String actionName, edu.wpi.first.wpilibj2.command.Command cmd) Binds a command to a Trigger's `.onFalse()` scheduling method while automatically publishing the mapped action name to NetworkTables/AdvantageKit.edu.wpi.first.wpilibj2.command.button.TriggerbindOnTrue(edu.wpi.first.wpilibj2.command.button.Trigger trigger, String buttonName, String actionName, edu.wpi.first.wpilibj2.command.Command cmd) Binds a command to a Trigger's `.onTrue()` scheduling method while automatically publishing the mapped action name to NetworkTables/AdvantageKit.edu.wpi.first.wpilibj2.command.button.TriggerbindWhileTrue(edu.wpi.first.wpilibj2.command.button.Trigger trigger, String buttonName, String actionName, edu.wpi.first.wpilibj2.command.Command cmd) Binds a command to a Trigger's `.whileTrue()` scheduling method while automatically publishing the mapped action name to NetworkTables/AdvantageKit.Methods inherited from class edu.wpi.first.wpilibj2.command.button.CommandXboxController
a, a, b, b, back, back, getHID, getLeftTriggerAxis, getLeftX, getLeftY, getRightTriggerAxis, getRightX, getRightY, leftBumper, leftBumper, leftStick, leftStick, leftTrigger, leftTrigger, leftTrigger, rightBumper, rightBumper, rightStick, rightStick, rightTrigger, rightTrigger, rightTrigger, start, start, x, x, y, yMethods inherited from class edu.wpi.first.wpilibj2.command.button.CommandGenericHID
axisGreaterThan, axisGreaterThan, axisLessThan, axisLessThan, axisMagnitudeGreaterThan, axisMagnitudeGreaterThan, button, button, getRawAxis, isConnected, pov, pov, povCenter, povDown, povDownLeft, povDownRight, povLeft, povRight, povUp, povUpLeft, povUpRight, setRumble
-
Constructor Details
-
TelemetryGamepad
-
-
Method Details
-
bindOnTrue
public edu.wpi.first.wpilibj2.command.button.Trigger bindOnTrue(edu.wpi.first.wpilibj2.command.button.Trigger trigger, String buttonName, String actionName, edu.wpi.first.wpilibj2.command.Command cmd) Binds a command to a Trigger's `.onTrue()` scheduling method while automatically publishing the mapped action name to NetworkTables/AdvantageKit.- Parameters:
trigger- The Trigger instance (e.g. this.a())buttonName- The human-readable physical button name (e.g. "A_Button")actionName- The macro the button runs (e.g. "Score Gamepiece")cmd- The Command to schedule- Returns:
- The Trigger to allow method chaining
-
bindWhileTrue
public edu.wpi.first.wpilibj2.command.button.Trigger bindWhileTrue(edu.wpi.first.wpilibj2.command.button.Trigger trigger, String buttonName, String actionName, edu.wpi.first.wpilibj2.command.Command cmd) Binds a command to a Trigger's `.whileTrue()` scheduling method while automatically publishing the mapped action name to NetworkTables/AdvantageKit.- Parameters:
trigger- The Trigger instance (e.g. this.a())buttonName- The human-readable physical button name (e.g. "RightTrigger")actionName- The macro the button runs (e.g. "Shoot On Move")cmd- The Command to schedule- Returns:
- The Trigger to allow method chaining
-
bindOnFalse
public edu.wpi.first.wpilibj2.command.button.Trigger bindOnFalse(edu.wpi.first.wpilibj2.command.button.Trigger trigger, String buttonName, String actionName, edu.wpi.first.wpilibj2.command.Command cmd) Binds a command to a Trigger's `.onFalse()` scheduling method while automatically publishing the mapped action name to NetworkTables/AdvantageKit.- Parameters:
trigger- The Trigger instance (e.g. this.a())buttonName- The human-readable physical button name (e.g. "A_Button")actionName- The macro the button runs (e.g. "Retract System")cmd- The Command to schedule- Returns:
- The Trigger to allow method chaining
-
getBindingsMap
-