@Override protected void end() { timer1.stop(); shooterWheel.rawShoot(0); shooterBar.rawBallPush(0); System.out.println("Shoot End"); }
/* * reads the value of the digital input of the specified channel * requires that the readArudiono() method has already been called * param 1: the channel to be read * return: value of the specified digital input */ public boolean getInput(int channelID) { byte temp; if (timer.get() > 2.0) { DriverStationLCD.getInstance() .println(DriverStationLCD.Line.kUser3, 1, " "); DriverStationLCD.getInstance().updateLCD(); timer.stop(); timer.reset(); } if (Math.abs(channelID - (13 / 2)) - (13 / 2) > 0) // returns true if less than zero or greater than thirteen { timer.start(); DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser3, 1, "Invalid ID"); DriverStationLCD.getInstance().updateLCD(); return false; } else if (channelID < 8) { temp = (byte) (loByte & (1 << channelID)); return temp != 0; } else { temp = (byte) (hiByte & (1 << channelID - 8)); return temp != 0; } }
public DriveForwardForTime(double numberOfSeconds, double speed) { requires(Chassis.getInstance()); this.numberOfSeconds = numberOfSeconds; timer = new Timer(); timer.stop(); this.speed = speed; }
/** Resets the recorder so we can record properly next time */ public void reset() { if (m_bRecStarted) { writeDataToFile(); m_List.removeAllElements(); m_Index = 0; m_tmRecorder.stop(); m_tmRecorder.reset(); m_bRecDone = false; m_bRecStarted = false; } }
private double m_shoot() { if (encoder.get() >= desired || shootTime.get() > m_timeToShoot) { shooting = false; retracting = true; shootTime.stop(); retractTime.start(); retractTime.reset(); return .1; } else { // encoder < desired && shootTime < 0.2 error = desired - encoder.get(); return -1; } }
/** * Records bots movements to specified file * * @param sFileName */ public void record(String sFileName) { if (!m_bRecStarted) { m_sFile = sFileName; m_tmRecorder.start(); m_bRecStarted = true; } if (!m_bRecDone) { m_Index++; m_botDataAuto = new BotData(); m_botDataAuto.setValues(m_tmRecorder.get(), m_bot); m_List.addElement(m_botDataAuto); } else { Vars.fnDisableDrive(); m_bot.stopRobot(); m_tmRecorder.stop(); m_tmRecorder.reset(); } }
protected void end() { _timer.stop(); }
@Override protected void end() { timer.stop(); }
// Called once after isFinished returns true protected void end() { timer.stop(); intake.stop(); }
protected void end() { pidControllerDistance.disable(); drivetrainStrafe.mecanumPolarStrafe(0, 0); drivetrainRotation.mecanumPolarRotate(0); timer.stop(); }
public static void Reinit() { timer.stop(); timer.reset(); timer.start(); }