mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilib] Split DriverStation into smaller classes (#8628)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
package org.wpilib.driverstation;
|
||||
|
||||
import org.wpilib.driverstation.internal.DriverStationBackend;
|
||||
import org.wpilib.event.BooleanEvent;
|
||||
import org.wpilib.event.EventLoop;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
@@ -1334,11 +1335,11 @@ public class Gamepad extends GenericHID implements Sendable {
|
||||
}
|
||||
|
||||
private double getAxisForSendable(Axis axis) {
|
||||
return DriverStation.getStickAxisIfAvailable(getPort(), axis.value).orElse(0.0);
|
||||
return DriverStationBackend.getStickAxisIfAvailable(getPort(), axis.value).orElse(0.0);
|
||||
}
|
||||
|
||||
private boolean getButtonForSendable(Button button) {
|
||||
return DriverStation.getStickButtonIfAvailable(getPort(), button.value).orElse(false);
|
||||
return DriverStationBackend.getStickButtonIfAvailable(getPort(), button.value).orElse(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user