-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Superstructure #2
Merged
Merged
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ed703f7
Created subsystem & superstructure files
yashgupta-17 f2627b8
Created subsystem classes
yashgupta-17 69fe42a
added stuff to arm.java
yashgupta-17 39eec2d
finished? arm class & commands
yashgupta-17 1ef43ff
Updatedv1Intake.java
suhaank077 5fab694
updated Arm.java
yashgupta-17 7563566
added shooter code
suhaank077 4bce311
worked on Climber.java
yashgupta-17 a3ca656
added build file fixed
AyushSagar16 8936188
Added Climber commands, make fixes to Arm, created Superstructure class
yashgupta-17 09be8ce
Added climber to superstructure
AyushSagar16 188f3af
fixing shooter and intake stuff
suhaank077 ce2decd
Merge branch 'main' of https://github.com/FRC5190/2024CompetitionSeas…
AyushSagar16 c8aa26b
Added to superstructure, constants, fixed formatting
AyushSagar16 c96b758
added shooter commands
yashgupta-17 2aed196
UpdatedIntakeFeb24
Jake-GHHS 59bb28e
Intake and shooter almost finished
AyushSagar16 caf83ef
Simulation added, climber removed
AyushSagar16 c9d2100
Formatting
AyushSagar16 5ef6233
added setangle pid
AyushSagar16 2a076ac
Working superstructure
AyushSagar16 e385653
Merge branch 'main' into superstructure
AyushSagar16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,10 @@ | ||
{ | ||
"NTProvider": { | ||
"types": { | ||
"/FMSInfo": "FMSInfo" | ||
} | ||
}, | ||
"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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package org.ghrobotics.frc2024; | ||
|
||
public class Superstructure { | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/org/ghrobotics/frc2024/commands/ArmToPosition.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,37 @@ | ||||||
package org.ghrobotics.frc2024.commands; | ||||||
|
||||||
import edu.wpi.first.wpilibj2.command.Command; | ||||||
import org.ghrobotics.frc2024.subsystems.Arm; | ||||||
|
||||||
public class ArmToPosition extends Command { | ||||||
// Subsystems | ||||||
private final Arm arm_; | ||||||
|
||||||
// Position | ||||||
private final double position_; | ||||||
|
||||||
// Constructor | ||||||
public ArmToPosition(Arm arm, double position) { | ||||||
// Assign member variables | ||||||
arm_ = arm; | ||||||
position_ = position; | ||||||
|
||||||
// Add subsystem requirements | ||||||
addRequirements(arm_); | ||||||
} | ||||||
|
||||||
@Override | ||||||
public void initialize() { | ||||||
arm_.setAngle(position_); | ||||||
} | ||||||
|
||||||
@Override | ||||||
public boolean isFinished() { | ||||||
return Math.abs(arm_.getAngle() - position_) < Constants.kTolerance; | ||||||
} | ||||||
|
||||||
// Constants | ||||||
private static final class Constants { | ||||||
public static final double kTolerance = 0; // NEED TO UPDATE | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
} | ||||||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finish this file. Use enums to store position data. https://github.com/FRC5190/2023CompetitionSeason/blob/master/src/main/java/org/ghrobotics/frc2023/Superstructure.java#L122