generated from StuyPulse/Phil
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from StuyPulse/se/controls-redo
Se/controls redo
- Loading branch information
Showing
41 changed files
with
958 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...robot/commands/arm/ArmEnableOverride.java → ...commands/arm/ArmSetShootHeightToHigh.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.subsystems.arm.Arm; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
|
||
public class ArmEnableOverride extends InstantCommand{ | ||
public class ArmSetShootHeightToHigh extends InstantCommand{ | ||
|
||
private final Arm arm; | ||
|
||
public ArmEnableOverride() { | ||
this.arm = Arm.getInstance(); | ||
public ArmSetShootHeightToHigh() { | ||
arm = Arm.getInstance(); | ||
addRequirements(arm); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
arm.setOverriding(true); | ||
arm.setShootHeightHigh(); | ||
} | ||
} |
10 changes: 5 additions & 5 deletions
10
...obot/commands/arm/ArmDisableOverride.java → .../commands/arm/ArmSetShootHeightToLow.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.subsystems.arm.Arm; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
|
||
public class ArmDisableOverride extends InstantCommand{ | ||
public class ArmSetShootHeightToLow extends InstantCommand{ | ||
|
||
private final Arm arm; | ||
|
||
public ArmDisableOverride() { | ||
this.arm = Arm.getInstance(); | ||
public ArmSetShootHeightToLow() { | ||
arm = Arm.getInstance(); | ||
addRequirements(arm); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
arm.setOverriding(false); | ||
arm.setShootHeightLow(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/main/java/com/stuypulse/robot/commands/arm/ArmToClimbing.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.subsystems.arm.Arm; | ||
|
||
public class ArmToClimbing extends ArmSetState{ | ||
|
||
public ArmToClimbing(){ | ||
super(Arm.State.CLIMBING); | ||
} | ||
} |
31 changes: 4 additions & 27 deletions
31
src/main/java/com/stuypulse/robot/commands/arm/ArmToFerry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,10 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
import com.stuypulse.robot.subsystems.arm.Arm; | ||
import com.stuypulse.stuylib.util.StopWatch; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
public class ArmToFerry extends ArmSetState{ | ||
|
||
public class ArmToFerry extends InstantCommand{ | ||
|
||
private final Arm arm; | ||
private final StopWatch stopWatch; | ||
private double lastClick; | ||
|
||
public ArmToFerry() { | ||
arm = Arm.getInstance(); | ||
stopWatch = new StopWatch(); | ||
lastClick = 0; | ||
addRequirements(arm); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
if (stopWatch.getTime() - lastClick < Settings.Driver.DOUBLE_CLICK_TIME_BETWEEN_CLICKS) { | ||
arm.setRequestedState(Arm.State.LOB_FERRY); | ||
} | ||
else { | ||
arm.setRequestedState(Arm.State.LOW_FERRY); | ||
} | ||
lastClick = stopWatch.getTime(); | ||
public ArmToFerry(){ | ||
super(Arm.State.SPEAKER); | ||
} | ||
|
||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
src/main/java/com/stuypulse/robot/commands/arm/ArmToLobFerry.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/main/java/com/stuypulse/robot/commands/arm/ArmToLowFerry.java
This file was deleted.
Oops, something went wrong.
31 changes: 4 additions & 27 deletions
31
src/main/java/com/stuypulse/robot/commands/arm/ArmToSpeaker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,10 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
import com.stuypulse.robot.subsystems.arm.Arm; | ||
import com.stuypulse.stuylib.util.StopWatch; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
public class ArmToSpeaker extends ArmSetState{ | ||
|
||
public class ArmToSpeaker extends InstantCommand{ | ||
|
||
private final Arm arm; | ||
private final StopWatch stopWatch; | ||
private double lastClick; | ||
|
||
public ArmToSpeaker() { | ||
arm = Arm.getInstance(); | ||
stopWatch = new StopWatch(); | ||
lastClick = 0; | ||
addRequirements(arm); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
if (stopWatch.getTime() - lastClick < Settings.Driver.DOUBLE_CLICK_TIME_BETWEEN_CLICKS) { | ||
arm.setRequestedState(Arm.State.SPEAKER_HIGH); | ||
} | ||
else { | ||
arm.setRequestedState(Arm.State.SPEAKER_LOW); | ||
} | ||
lastClick = stopWatch.getTime(); | ||
public ArmToSpeaker(){ | ||
super(Arm.State.SPEAKER); | ||
} | ||
|
||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
src/main/java/com/stuypulse/robot/commands/arm/ArmToSpeakerHigh.java
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/main/java/com/stuypulse/robot/commands/arm/ArmToSpeakerLow.java
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/main/java/com/stuypulse/robot/commands/arm/ArmToSubwooferShot.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.subsystems.arm.Arm; | ||
|
||
public class ArmToSubwooferShot extends ArmSetState{ | ||
|
||
public ArmToSubwooferShot(){ | ||
super(Arm.State.SUBWOOFER_SHOT); | ||
} | ||
} |
Oops, something went wrong.