-
Notifications
You must be signed in to change notification settings - Fork 1
Shooter Subsystem #42
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
base: main
Are you sure you want to change the base?
Changes from all commits
5c3b9ac
c5aa373
85d0dc8
e6625bd
120bae6
ef8e2f4
fbca883
dd9007d
df4bba9
2800811
8bef29a
c8c3fc1
0ac794f
bb0708a
d15313f
2c15904
9b99135
7e34c6e
9921e1f
8100182
1ae5ca3
e310535
47661ad
7cb5f1e
208dc81
e4445a1
0fa8054
a2d8b66
04f0d22
869204d
631646a
e67c0cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #Sat Feb 07 15:30:15 EST 2026 | ||
| gradle.version=8.11 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "currentLanguage": "none", | ||
| "enableCppIntellisense": false, | ||
| "projectYear": "none", | ||
| "teamNumber": 2706 | ||
| } | ||
|
Contributor
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. this file should be deleted. |
| 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 | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
| import edu.wpi.first.wpilibj2.command.Command; | ||
| import edu.wpi.first.wpilibj2.command.CommandScheduler; | ||
|
|
||
|
|
||
| /** | ||
| * The methods in this class are called automatically corresponding to each mode, as described in | ||
| * the TimedRobot documentation. If you change the name of this class or the package after creating | ||
|
|
@@ -16,6 +17,8 @@ | |
| public class Robot extends TimedRobot { | ||
| private Command m_autonomousCommand; | ||
|
|
||
|
|
||
|
|
||
| private final RobotContainer m_robotContainer; | ||
|
|
||
| /** | ||
|
|
@@ -25,9 +28,13 @@ public class Robot extends TimedRobot { | |
| public Robot() { | ||
| // Instantiate our RobotContainer. This will perform all our button bindings, and put our | ||
| // autonomous chooser on the dashboard. | ||
| System.out.println("shooter system initialized"); | ||
|
Contributor
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. We should remove print statements, if we want to log things we should use a separate logging system. |
||
| m_robotContainer = new RobotContainer(); | ||
|
|
||
|
|
||
| } | ||
|
|
||
|
|
||
| /** | ||
| * This function is called every 20 ms, no matter the mode. Use this for items like diagnostics | ||
| * that you want ran during disabled, autonomous, teleoperated and test. | ||
|
|
@@ -79,7 +86,8 @@ public void teleopInit() { | |
|
|
||
| /** This function is called periodically during operator control. */ | ||
| @Override | ||
| public void teleopPeriodic() {} | ||
| public void teleopPeriodic() { | ||
| } | ||
|
|
||
| @Override | ||
| public void testInit() { | ||
|
|
||
|
Contributor
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. Nitpick: All java classes should be "PascalCase" (aka. first letter of every word should be capitalized) and methods should be camelCase (aka. first letter of every word, except for the first one, should be capitalized) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| // Copyright (c) FIRST and other WPILib contributors. | ||
| // Open Source Software; you can modify and/or share it under the terms of | ||
| // the WPILib BSD license file in the root directory of this project. | ||
|
|
||
| package frc.robot.commands; | ||
|
|
||
| import frc.robot.subsystems.ShooterSubsystem; | ||
| import edu.wpi.first.wpilibj2.command.Command; | ||
| import edu.wpi.first.wpilibj2.command.RunCommand; | ||
|
|
||
| import java.util.concurrent.TimeUnit; | ||
|
|
||
|
|
||
| /** An example command that uses an example subsystem. */ | ||
|
Contributor
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. lets update the comments with something more applicable to the current command/class |
||
| public class startShooter extends Command { | ||
| @SuppressWarnings("PMD.UnusedPrivateField") | ||
| private final ShooterSubsystem m_ShooterSubystsem; | ||
|
|
||
| /** | ||
| * Creates a new ExampleCommand. | ||
| * | ||
| * @param subsystem The subsystem used by this command. | ||
| */ | ||
| public startShooter(ShooterSubsystem subsystem) { | ||
| m_ShooterSubystsem = subsystem; | ||
| // Use addRequirements() here to declare subsystem dependencies. | ||
| addRequirements(m_ShooterSubystsem); | ||
| } | ||
|
|
||
| // Called when the command is initially scheduled. | ||
| @Override | ||
| public void initialize() { | ||
|
|
||
| } | ||
|
|
||
|
|
||
| // Called every time the scheduler runs while the command is scheduled. | ||
| @Override | ||
| public void execute() { | ||
| System.out.println("in startShooter command"); | ||
| if (m_ShooterSubystsem.isRPMinRange()) { | ||
| m_ShooterSubystsem.ready(); | ||
| } else { | ||
| m_ShooterSubystsem.spinningUp(); | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
| // Called once the command ends or is interrupted. | ||
| @Override | ||
| public void end(boolean interrupted) {} | ||
|
|
||
| // Returns true when the command should end. | ||
| @Override | ||
| public boolean isFinished() { | ||
| return false; | ||
|
Contributor
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. is this should return true when the command should end, and we just return false, does that mean the command never ends? |
||
| } | ||
| } | ||
|
|
||
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.
this shouldn't be committed either. We need to keep the projectYear and currentLanguage set, as it is now in the codebase.