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 #3 from StuyPulse/se/algae-mech
Se/algae mech
- Loading branch information
Showing
17 changed files
with
617 additions
and
3 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,44 @@ | ||
{ | ||
"NTProvider": { | ||
"types": { | ||
"/FMSInfo": "FMSInfo", | ||
"/SmartDashboard/Autonomous": "String Chooser", | ||
"/SmartDashboard/algae": "Mechanism2d" | ||
}, | ||
"windows": { | ||
"/SmartDashboard/algae": { | ||
"window": { | ||
"visible": true | ||
} | ||
} | ||
} | ||
}, | ||
"NetworkTables": { | ||
"transitory": { | ||
"FMSInfo": { | ||
"open": true | ||
}, | ||
"LiveWindow": { | ||
"open": true | ||
}, | ||
"Shuffleboard": { | ||
"open": true | ||
}, | ||
"SmartDashboard": { | ||
"algae": { | ||
"open": true | ||
}, | ||
"open": true | ||
} | ||
} | ||
}, | ||
"NetworkTables Info": { | ||
"Clients": { | ||
"open": true | ||
}, | ||
"Server": { | ||
"open": true | ||
}, | ||
"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
15 changes: 15 additions & 0 deletions
15
src/main/java/com/stuypulse/robot/commands/algae/AlgaeGroundPickup.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,15 @@ | ||
package com.stuypulse.robot.commands.algae; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class AlgaeGroundPickup extends AlgaeSetPivot { | ||
|
||
public AlgaeGroundPickup(){ | ||
super(Settings.Algae.GROUND_PICKUP_ANGLE); | ||
algae.acquireUnder(); | ||
} | ||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/stuypulse/robot/commands/algae/AlgaeL2.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,15 @@ | ||
package com.stuypulse.robot.commands.algae; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class AlgaeL2 extends AlgaeSetPivot { | ||
|
||
public AlgaeL2(){ | ||
super(Settings.Algae.L2_ANGLE); | ||
algae.acquireUnder(); | ||
} | ||
|
||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/stuypulse/robot/commands/algae/AlgaeL3.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,15 @@ | ||
package com.stuypulse.robot.commands.algae; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class AlgaeL3 extends AlgaeSetPivot { | ||
|
||
public AlgaeL3(){ | ||
super(Settings.Algae.L3_ANGLE); | ||
algae.acquireOver(); | ||
} | ||
|
||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/stuypulse/robot/commands/algae/AlgaeProcessorScore.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,18 @@ | ||
package com.stuypulse.robot.commands.algae; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
|
||
public class AlgaeProcessorScore extends AlgaeSetPivot { | ||
|
||
public AlgaeProcessorScore(){ | ||
super(Settings.Algae.PROCESSOR_ANGLE); | ||
|
||
algae.deacquireUnder(); | ||
} | ||
|
||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/stuypulse/robot/commands/algae/AlgaeReefKnockoff.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.algae; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class AlgaeReefKnockoff extends AlgaeSetPivot { | ||
|
||
public AlgaeReefKnockoff(){ | ||
super(Settings.Algae.REEF_KNOCKOFF_ANGLE); | ||
} | ||
|
||
public void initialize(){ | ||
super.initialize(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/stuypulse/robot/commands/algae/AlgaeSetPivot.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.algae; | ||
|
||
import com.stuypulse.robot.subsystems.algae.*; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
|
||
public class AlgaeSetPivot extends InstantCommand { | ||
|
||
protected final Algae algae; | ||
private final double angle; //target angle | ||
|
||
public AlgaeSetPivot(double angle) { | ||
algae = Algae.getInstance(); | ||
|
||
this.angle = angle; | ||
addRequirements(algae); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
algae.setTargetAngle(angle); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/com/stuypulse/robot/commands/algae/AlgaeStopRoller.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,22 @@ | ||
package com.stuypulse.robot.commands.algae; | ||
|
||
import com.stuypulse.robot.subsystems.algae.*; | ||
|
||
import edu.wpi.first.wpilibj2.command.InstantCommand; | ||
|
||
public class AlgaeStopRoller extends InstantCommand { | ||
|
||
private final Algae algae; | ||
|
||
public AlgaeStopRoller() { | ||
algae = Algae.getInstance(); | ||
|
||
addRequirements(algae); | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
algae.stopRollers(); | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/stuypulse/robot/commands/algae/AlgaeStow.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.algae; | ||
|
||
import com.stuypulse.robot.constants.Settings; | ||
|
||
public class AlgaeStow extends AlgaeSetPivot { | ||
|
||
public AlgaeStow() { | ||
super(Settings.Algae.STOW_ANGLE); | ||
} | ||
} |
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
Oops, something went wrong.