FRC2706 / 2019-2706-Robot-Code

The main robot code for the FIRST 2019 challenge: Deep Space
MIT License
2 stars 0 forks source link

Button Assignments for DriverAssist #77

Closed RachelLucyshyn closed 5 years ago

RachelLucyshyn commented 5 years ago

RCVI needs to assign three buttons on driver controls to initiate 3 actions. We want the top three buttons that are part of the four button group on the right-hand side.

Assignments: DriverAssist with vision (rocket): Right (B) DriverAssist with vision (cargo ship): Left (X) DriverAssist with laser rangefinder: Top middle (Y)

ryanlarkin commented 5 years ago

You can add these buttons into OI like this:

Config.java

// #### Fluid constants ####
...
public static final FluidConstant<String> NAME_OF_BUTTON = constant("button-name", XboxValue.XBOX_{letter}_BUTTON.NTString);

OI.java

public OI(Joystick driverStick, Joystick controlStick) {
...
    new FluidButton(driver/controlStick, Config.NAME_OF_BUTTON).whenPressed(new CommandToRun(...));
}
ryanlarkin commented 5 years ago

Has this issue been resolved?

KyleRAnderson commented 5 years ago

The driver controls have been added, resolving this.