Class TriggerBindings
Uses WPILib's CommandXboxController which is compatible with Logitech F310 controllers when set to XInput mode (back switch on X).
-
Constructor Summary
ConstructorsConstructorDescriptionTriggerBindings(DriveBaseSubsystemCommandFactory driveBaseCommandFactory, TriggerBindingsConfig triggerBindingsConfig, TurretSubsystemCommandFactory turretCommandFactory, ShooterSubsystemCommandFactory shooterCommandFactory, IndexerSubsystemCommandFactory indexerCommandFactory, FeederSubsystemCommandFactory feederCommandFactory, IntakeSubsystemCommandFactory intakeCommandFactory, HarvesterSubsystemCommandFactory harvesterCommandFactory, GameplayStateCommandFactory gameplayStateCommandFactory) Creates trigger bindings with the default driver controller port.TriggerBindings(DriveBaseSubsystemCommandFactory driveBaseCommandFactory, TriggerBindingsConfig triggerBindingsConfig, TurretSubsystemCommandFactory turretCommandFactory, ShooterSubsystemCommandFactory shooterCommandFactory, IndexerSubsystemCommandFactory indexerCommandFactory, FeederSubsystemCommandFactory feederCommandFactory, IntakeSubsystemCommandFactory intakeCommandFactory, HarvesterSubsystemCommandFactory harvesterCommandFactory, GameplayStateCommandFactory gameplayStateCommandFactory, int driverControllerPort, int operatorControllerPort) Creates trigger bindings using explicit controller ports. -
Method Summary
Modifier and TypeMethodDescriptionvoidChecks controller connectivity and input health, logging warnings and telemetry.
-
Constructor Details
-
Method Details
-
checkControllerHealth
public void checkControllerHealth()Checks controller connectivity and input health, logging warnings and telemetry.Call this once per robot cycle (e.g., from a default command supplier or
robotPeriodic). It performs two checks per controller:1. Connection check via
DriverStation.isJoystickConnected(int). A warning fires once when a controller transitions from connected to disconnected. The latch resets when the controller reconnects.2. Stale-input detection during teleop. If a controller reports as connected but all axes have been exactly zero for 50 consecutive teleop cycles, a warning fires once. This catches the failure mode where the Windows USB data pipe goes to sleep during autonomous and fails to wake for teleop (the DS shows the device as present because the USB descriptor is cached, but actual input data is stale). The stale warning resets when the robot leaves teleop.
-