Stage 1A Rev Solution Code#24
Conversation
| public SparkMax intake = new SparkMax(0, 4, MotorType.kBrushless); | ||
| public SparkMax shooter = new SparkMax(0, 5, MotorType.kBrushless); |
There was a problem hiding this comment.
I would place these two underneath the drivetrain so that all of the public 'subsystem' fields are together
|
You should add spotless formating |
|
You're creating the mechanism sim and publishing inline in drivetrainSim but in the custructor in flywheelSim. |
|
Rename subsystems: IntakeLauncher and Feeder context: https://discord.com/channels/1516145538297368707/1516151527126073434/1517358128814100641 |
|
Updated the controls to more closely match the real kitbot. Note that the kitbot has some logic for spinning up the shooter. For simplicity's sake, I've chosen to omit that from here, though we could actually implement it in Stage 1B for the command based kitbot |
| @Override | ||
| public void periodic() { | ||
| if (timer.hasElapsed(4)) { | ||
| robot.drivetrain.arcadeDrive(0.0, 0.0); // Stop the robot after 4 seconds |
There was a problem hiding this comment.
Should there also be something to tell the robot to shoot?
There was a problem hiding this comment.
I don't think it's worth it, I think implementing any sort of sequential behavior is the point at which you go to use commands, which takes us into stage 1B
There was a problem hiding this comment.
It could provide an example of where commands are useful. Contrasting the if statements with a command sequence.
For #25
Solution for Stage 1A - going to go back and strip stuff out for the starter code once this is merged.
Note that REV SparkSim is currently bugged (wpilibsuite/SystemcoreTesting#284), so we're rolling our own sim implementation for the time being. While this sim implementation doesn't support the REV APIs, it does everything it needs to do as far as Stage 1 is concerned.