HOMEEEEEEEEEEEEEEEE
This commit is contained in:
parent
1280197ccf
commit
3f01a07548
|
|
@ -203,8 +203,12 @@ public class TurretSubsystem extends TestableSubsystem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
|
|
||||||
if(turretState == TurretState.HOMING)
|
if(turretState == TurretState.HOMING)
|
||||||
|
{
|
||||||
|
while(turretState != TurretState.READY)
|
||||||
|
{
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
|
while(System.currentTimeMillis()-1000<start)
|
||||||
{
|
{
|
||||||
if(turretLimitSwitch.get())
|
if(turretLimitSwitch.get())
|
||||||
{ // Turret has tripped the switch
|
{ // Turret has tripped the switch
|
||||||
|
|
@ -229,6 +233,9 @@ public class TurretSubsystem extends TestableSubsystem {
|
||||||
// setTurretMotorRotation(-0.34); // Return to 0 after MIAMI VALLEY
|
// setTurretMotorRotation(-0.34); // Return to 0 after MIAMI VALLEY
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
turretMotor.set((turretMotor.get()*-1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(LOGGING)
|
if(LOGGING)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue