|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
RobotDrive myRobot; // class that handles basic drive operations
Joystick leftStick; // set to ID 1 in DriverStation Joystick rightStick; // set to ID 2 in DriverStation public Robot() { myRobot = new RobotDrive(0, 1); myRobot.setExpiration(0.1); leftStick = new Joystick(0); rightStick = new Joystick(1); } /** * Runs the motors with tank steering. */ public void operatorControl() { myRobot.setSafetyEnabled(true); while (isOperatorControl() && isEnabled()) { myRobot.tankDrive(leftStick, rightStick); System.out.println(leftStick.getY()); System.out.println(rightStick.getY()); leftStick.getRawAxis(0); Timer.delay(0.005) ; } // wait for a motor update time} because it is getting annoyed at the curly braces i bolded and i cannot run anything until it is fixed |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|