public Oi() { //Pilot togglables ArcadeToggle.WhenPressed(new ArcadeEnable()); TankToggle.WhenPressed(new TankEnable()); HigherGear.WhenPressed(new ShiftUpCommand()); LowerGear.WhenPressed(new ShiftDownCommand()); }
public OI() { driving = new Joystick(RobotMap.joystickDriving); operating = new Joystick(RobotMap.joystickOperating); operatingButtonGearUpUp = new JoystickButton(operating, RobotMap.joystickOperatingGearUpUp); operatingButtonGearUpDown = new JoystickButton(operating, RobotMap.joystickOperatingGearUpDown); operatingButtonGearIntakeIn = new JoystickButton(operating, RobotMap.joystickOperatingGearIntakeIn); operatingButtonGearIntakeOut = new JoystickButton(operating, RobotMap.joystickOperatingGearIntakeOut); // these are test button for go straight, X - forward, B - backward // (new JoystickButton(driving,1)).ToggleWhenPressed(new Commands.DrivingStraightCommand(0.36)); // (new JoystickButton(driving,3)).ToggleWhenPressed(new Commands.DrivingStraightCommand(-0.36)); operatingButtonGearUpUp.WhenPressed(new Commands.OperatingGearUpButtonCommand(1.6)); operatingButtonGearUpUp.WhenReleased(new Commands.OperatingGearUpButtonCommand(0)); operatingButtonGearUpDown.WhenPressed(new Commands.OperatingGearUpButtonCommand(-1.6)); operatingButtonGearUpDown.WhenReleased(new Commands.OperatingGearUpButtonCommand(0)); operatingButtonGearIntakeIn.WhenPressed(new Commands.OperatingGearIntakeCommand(1)); operatingButtonGearIntakeIn.WhenReleased(new Commands.OperatingGearIntakeCommand(0)); operatingButtonGearIntakeOut.WhenPressed(new Commands.OperatingGearIntakeCommand(-0.78)); operatingButtonGearIntakeOut.WhenReleased(new Commands.OperatingGearIntakeCommand(0)); }