generated from StuyPulse/Phil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
1,658 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
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,92 @@ | ||
{ | ||
"keyboardJoysticks": [ | ||
{ | ||
"axisConfig": [ | ||
{ | ||
"decKey": 65, | ||
"incKey": 68 | ||
}, | ||
{ | ||
"decKey": 87, | ||
"incKey": 83 | ||
}, | ||
{ | ||
"decKey": 69, | ||
"decayRate": 0.0, | ||
"incKey": 82, | ||
"keyRate": 0.009999999776482582 | ||
} | ||
], | ||
"axisCount": 3, | ||
"buttonCount": 4, | ||
"buttonKeys": [ | ||
90, | ||
88, | ||
67, | ||
86 | ||
], | ||
"povConfig": [ | ||
{ | ||
"key0": 328, | ||
"key135": 323, | ||
"key180": 322, | ||
"key225": 321, | ||
"key270": 324, | ||
"key315": 327, | ||
"key45": 329, | ||
"key90": 326 | ||
} | ||
], | ||
"povCount": 1 | ||
}, | ||
{ | ||
"axisConfig": [ | ||
{ | ||
"decKey": 74, | ||
"incKey": 76 | ||
}, | ||
{ | ||
"decKey": 73, | ||
"incKey": 75 | ||
} | ||
], | ||
"axisCount": 2, | ||
"buttonCount": 4, | ||
"buttonKeys": [ | ||
77, | ||
44, | ||
46, | ||
47 | ||
], | ||
"povCount": 0 | ||
}, | ||
{ | ||
"axisConfig": [ | ||
{ | ||
"decKey": 263, | ||
"incKey": 262 | ||
}, | ||
{ | ||
"decKey": 265, | ||
"incKey": 264 | ||
} | ||
], | ||
"axisCount": 2, | ||
"buttonCount": 6, | ||
"buttonKeys": [ | ||
260, | ||
268, | ||
266, | ||
261, | ||
269, | ||
267 | ||
], | ||
"povCount": 0 | ||
}, | ||
{ | ||
"axisCount": 0, | ||
"buttonCount": 0, | ||
"povCount": 0 | ||
} | ||
] | ||
} |
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,29 @@ | ||
{ | ||
"NTProvider": { | ||
"types": { | ||
"/FMSInfo": "FMSInfo", | ||
"/SmartDashboard/Autonomous": "String Chooser", | ||
"/SmartDashboard/Visualizers/Elevator": "Mechanism2d" | ||
}, | ||
"windows": { | ||
"/SmartDashboard/Visualizers/Elevator": { | ||
"window": { | ||
"visible": true | ||
} | ||
} | ||
} | ||
}, | ||
"NetworkTables": { | ||
"transitory": { | ||
"SmartDashboard": { | ||
"Elevator": { | ||
"open": true | ||
}, | ||
"open": true | ||
} | ||
} | ||
}, | ||
"NetworkTables Info": { | ||
"visible": true | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToAngle.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,24 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.subsystems.arm.Arm; | ||
|
||
import edu.wpi.first.math.geometry.Rotation2d; | ||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
|
||
|
||
public class ArmMoveToAngle extends InstantCommand{ | ||
private final Arm arm; | ||
private final Rotation2d angle; | ||
|
||
public ArmMoveToAngle(Rotation2d angle){ | ||
arm = Arm.getInstance(); | ||
this.angle = angle; | ||
} | ||
|
||
@Override | ||
public void initialize(){ | ||
arm.setTargetAngle(angle); | ||
|
||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToFunnel.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,14 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
|
||
public class ArmMoveToFunnel extends ArmMoveToAngle{ | ||
public ArmMoveToFunnel(){ | ||
super(Settings.Arm.FUNNEL_ANGLE); | ||
} | ||
@Override | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToL2Back.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,13 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class ArmMoveToL2Back extends ArmMoveToAngle{ | ||
public ArmMoveToL2Back(){ | ||
super(Settings.Arm.L2_ANGLE_BACK); | ||
} | ||
@Override | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToL2Front.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,14 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
|
||
public class ArmMoveToL2Front extends ArmMoveToAngle{ | ||
public ArmMoveToL2Front(){ | ||
super(Settings.Arm.L2_ANGLE_FRONT); | ||
} | ||
@Override | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToL3Back.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,13 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class ArmMoveToL3Back extends ArmMoveToAngle { | ||
public ArmMoveToL3Back(){ | ||
super(Settings.Arm.L3_ANGLE_BACK); | ||
} | ||
@Override | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToL3Front.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,14 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
|
||
public class ArmMoveToL3Front extends ArmMoveToAngle{ | ||
public ArmMoveToL3Front(){ | ||
super(Settings.Arm.L3_ANGLE_FRONT); | ||
} | ||
@Override | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToL4Back.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,13 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class ArmMoveToL4Back extends ArmMoveToAngle { | ||
public ArmMoveToL4Back(){ | ||
super(Settings.Arm.L4_ANGLE_BACK); | ||
} | ||
@Override | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/stuypulse/robot/commands/arm/ArmMoveToL4Front.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,14 @@ | ||
package com.stuypulse.robot.commands.arm; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
|
||
public class ArmMoveToL4Front extends ArmMoveToAngle{ | ||
public ArmMoveToL4Front(){ | ||
super(Settings.Arm.L4_ANGLE_FRONT); | ||
} | ||
@Override | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/stuypulse/robot/commands/elevator/ElevatorToBottom.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,9 @@ | ||
package com.stuypulse.robot.commands.elevator; | ||
|
||
import com.stuypulse.robot.constants.Constants.Elevator; | ||
|
||
public class ElevatorToBottom extends ElevatorToHeight{ | ||
public ElevatorToBottom(){ | ||
super(Elevator.MIN_HEIGHT_METERS); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/stuypulse/robot/commands/elevator/ElevatorToHandoff.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.elevator; | ||
|
||
import com.stuypulse.robot.constants.Settings.Elevator; | ||
|
||
public class ElevatorToHandoff extends ElevatorToHeight{ | ||
public ElevatorToHandoff() { | ||
super(Elevator.HANDOFF_HEIGHT_METERS); | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/com/stuypulse/robot/commands/elevator/ElevatorToHeight.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,29 @@ | ||
package com.stuypulse.robot.commands.elevator; | ||
|
||
import com.stuypulse.robot.subsystems.elevator.Elevator; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
import edu.wpi.first.wpilibj2.command.WaitUntilCommand; | ||
import edu.wpi.first.wpilibj2.command.Command; | ||
|
||
public class ElevatorToHeight extends InstantCommand { | ||
|
||
public static Command untilDone(double height) { | ||
return new ElevatorToHeight(height) | ||
.andThen(new WaitUntilCommand(() -> Elevator.getInstance().atTargetHeight())); | ||
} | ||
|
||
private final Elevator elevator; | ||
private final double targetHeight; | ||
|
||
public ElevatorToHeight(double targetHeight){ | ||
elevator = Elevator.getInstance(); | ||
this.targetHeight = targetHeight; | ||
|
||
addRequirements(elevator); | ||
} | ||
|
||
public void initialize(){ | ||
elevator.setTargetHeight(targetHeight); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/stuypulse/robot/commands/elevator/ElevatorToLvl2Alt.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,9 @@ | ||
package com.stuypulse.robot.commands.elevator; | ||
|
||
import com.stuypulse.robot.constants.Settings.Elevator; | ||
|
||
public class ElevatorToLvl2Alt extends ElevatorToHeight{ | ||
public ElevatorToLvl2Alt(){ | ||
super(Elevator.ALT_L2_HEIGHT_METERS); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/com/stuypulse/robot/commands/elevator/ElevatorToLvl2Funnel.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,9 @@ | ||
package com.stuypulse.robot.commands.elevator; | ||
|
||
import com.stuypulse.robot.constants.Settings.Elevator; | ||
|
||
public class ElevatorToLvl2Funnel extends ElevatorToHeight{ | ||
public ElevatorToLvl2Funnel(){ | ||
super(Elevator.FUNNEL_L2_HEIGHT_METERS); | ||
} | ||
} |
Oops, something went wrong.