public void operatorControl() { if(joystick.getRawButton(3)) { servo.set(1); } else if(joystick.getRawButton(4)) { servo.set(-1); } }
while(isOperatorControl()) { // Code here }