Stage1a auto + additonal motors - #194
Conversation
|
🌐 Preview URL: https://pr-194.frcsoftware.pages.dev |
| This can be accomplished by periodically checking if it has been four seconds since the start of auto using the `Timer` instance. | ||
| If it has been at least four seconds then command the drivetrain with zero speed. | ||
| Otherwise command the drivetrain to drive forward at half speed. | ||
| Writing that out in code will look like this |
There was a problem hiding this comment.
Maybe not but is there a way to make it less "copy and paste" and have the steps be broken down more? Could be something like
- Explaining how we want to check if the if it has been four seconds since the start of auto using the
Timerinstance. - If so, then we want the robot to drive forward
- If the 4 seconds are up, then we want the robot to stop driving
Because it's 1a, I think breaking it down more will be helpful in giving students that foundational understanding
| @@ -25,6 +25,7 @@ public void start() { | |||
| autoTimer.restart(); // Reset the timer to zero at the start of auto | |||
There was a problem hiding this comment.
It's autoTimer here but it's timer in the Rev solution. Should probably pick one and use it throughout
| # Additional Motors in Teleop | ||
|
|
||
| To control the new motors, the motors need to be commanded inside of the `MyTeleop` `OpMode`'s `periodic()` function. | ||
| When the controller's right bumper is pressed, the IntakeLauncher motor should have a throttle of 0.9 while the Feeder motor should have a throttle of 0.75. |
There was a problem hiding this comment.
But these literals should be
| # Autonomous OpMode | ||
|
|
||
| Now that the kitbot can move in teleop mode, it is time to make it move during the auto mode. | ||
| To do this, another `OpMode` needs to be written that contains all the code needed to make the robot do what's wanted in auto. |
There was a problem hiding this comment.
This sentence feels long
| Testing the auto routine is similar to testing the teleop drivetrain code. | ||
| However, instead of selecting the teleop mode the autonomous mode and MyAuto opmode should be selected. |
There was a problem hiding this comment.
Just say how to do it, rather than comparing it to teleop
| <Tabs syncKey={REV_CTRE_CHOOSER_KEY}> | ||
| <TabItem label="CTRE"> | ||
|
|
||
| ```java stage1/stage1a/solutions/ctre/src/main/java/first/robot/Robot.java#AdditionalMotors |
There was a problem hiding this comment.
It's probably cleaner to use code region sources here, so you can do
{ctreRobotSource}#AdditionalMotors.
Description
Adds stage 1a curriculum for programing a simple auto as well as progiraming the IntakeLauncher and Feeder motors. Makes progress on #13 .
Todo:
periodic()overupdate()Meta
Merge checklist: