Skip to content

Commit 04d3b64

Browse files
committed
Fixed a bunch more formatting errors in the Markdown and code snippets.
1 parent 0289e69 commit 04d3b64

File tree

12 files changed

+118
-116
lines changed

12 files changed

+118
-116
lines changed

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(grep:*)"
5+
]
6+
}
7+
}

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"postCreateCommand": [
1212
"pip3 install --user -r requirements.txt",
1313
"pip3 install --user first-agentic-csa"
14+
"curl -fsSL https://claude.ai/install.sh | bash"
1415
],
1516
"customizations": {
1617
"vscode": {

docs/code_examples/2026KitBotInline/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* wherever the constants are needed, to reduce verbosity.
1616
*/
1717
public final class Constants {
18-
// --8<-- [start: constants]
18+
// --8<-- [start:constants]
1919
public static final class DriveConstants {
2020
// Motor controller IDs for drivetrain motors
2121
public static final int LEFT_LEADER_ID = 1;
@@ -27,7 +27,7 @@ public static final class DriveConstants {
2727
// likelihood of tripping breakers or damaging CIM motors
2828
public static final int DRIVE_MOTOR_CURRENT_LIMIT = 60;
2929
}
30-
//--8<-- [end: constants]
30+
//--8<-- [end:constants]
3131

3232
public static final class FuelConstants {
3333
// Motor controller IDs for Fuel Mechanism motors

docs/code_examples/2026KitBotInline/RobotContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ private void configureBindings() {
8484
// value). The X-axis is also inverted so a positive value (stick to the right)
8585
// results in clockwise rotation (front of the robot turning right). Both axes
8686
// are also scaled down so the rotation is more easily controllable.
87-
// --8<-- [start: drive-config]
87+
// --8<-- [start:drive-config]
8888
driveSubsystem.setDefaultCommand(
8989
driveSubsystem.driveArcade(
9090
() -> -driverController.getLeftY() * DRIVE_SCALING,
9191
() -> -driverController.getRightX() * ROTATION_SCALING));
92-
// --8<-- [end: drive-config]
92+
// --8<-- [end:drive-config]
9393
}
9494

9595
/**

docs/code_examples/2026KitBotInline/commands/DriveArcadeCommand.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
* how to create a command that gets input from joystick axes and drives the robot.
1515
*/
1616
public class DriveArcadeCommand extends Command {
17-
// --8<-- [start: class-variables]
17+
// --8<-- [start:class-variables]
1818
private final DoubleSupplier xSpeed;
1919
private final DoubleSupplier zRotation;
2020
private final CANDriveSubsystem driveSubsystem;
21-
// --8<-- [end: class-variables]
21+
// --8<-- [end:class-variables]
2222

2323
/**
2424
* Creates a new DriveArcadeCommand.
@@ -27,44 +27,44 @@ public class DriveArcadeCommand extends Command {
2727
* @param zRotation the input for rotation speed as a DoubleSupplier
2828
* @param driveSubsystem the subsystem that this command requires
2929
*/
30-
// --8<-- [start: constructor-signature]
30+
// --8<-- [start:constructor-signature]
3131
public DriveArcadeCommand(
3232
DoubleSupplier xSpeed, DoubleSupplier zRotation, CANDriveSubsystem driveSubsystem) {
33-
// --8<-- [end: constructor-signature]
34-
// --8<-- [start: constructor-body]
33+
// --8<-- [end:constructor-signature]
34+
// --8<-- [start:constructor-body]
3535
this.xSpeed = xSpeed;
3636
this.zRotation = zRotation;
3737
this.driveSubsystem = driveSubsystem;
3838
// Use addRequirements() here to declare subsystem dependencies.
3939
addRequirements(driveSubsystem);
40-
// --8<-- [end: constructor-body]
40+
// --8<-- [end:constructor-body]
4141
}
4242

4343
// Called when the command is initially scheduled.
4444
@Override
4545
public void initialize() {}
4646

4747
// Called every time the scheduler runs while the command is scheduled.
48-
// --8<-- [start: execute-method]
48+
// --8<-- [start:execute-method]
4949
@Override
5050
public void execute() {
5151
driveSubsystem.arcadeDrive(xSpeed.getAsDouble(), zRotation.getAsDouble());
5252
}
53-
// --8<-- [end: execute-method]
53+
// --8<-- [end:execute-method]
5454

5555
// Called once the command ends or is interrupted.
56-
// --8<-- [start: end-method]
56+
// --8<-- [start:end-method]
5757
@Override
5858
public void end(boolean interrupted) {
5959
driveSubsystem.arcadeDrive(0, 0);
6060
}
61-
// --8<-- [end: end-method]
61+
// --8<-- [end:end-method]
6262

6363
// Returns true when the command should end.
64-
// --8<-- [start: is-finished-method]
64+
// --8<-- [start:is-finished-method]
6565
@Override
6666
public boolean isFinished() {
6767
return false; // This command never finishes on its own; it runs continuously
6868
}
69-
// --8<-- [end: is-finished-method]
69+
// --8<-- [end:is-finished-method]
7070
}

docs/code_examples/2026KitBotInline/subsystems/CANDriveSubsystem.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
import static frc.robot.Constants.DriveConstants.*;
2121

2222
public class CANDriveSubsystem extends SubsystemBase {
23-
// --8<-- [start: motors]
23+
// --8<-- [start:motors]
2424
private final SparkMax leftLeader;
2525
private final SparkMax leftFollower;
2626
private final SparkMax rightLeader;
2727
private final SparkMax rightFollower;
2828

29-
// --8<-- [end: motors]
29+
// --8<-- [end:motors]
3030

31-
// --8<-- [start: differential-drive-variable]
31+
// --8<-- [start:differential-drive-variable]
3232
private final DifferentialDrive drive;
33-
// --8<-- [end: differential-drive-variable]
33+
// --8<-- [end:differential-drive-variable]
3434

35-
// --8<-- [start: constructor]
35+
// --8<-- [start:constructor]
3636

3737
public CANDriveSubsystem() {
3838
// create brushed motors for drive
@@ -47,58 +47,58 @@ public CANDriveSubsystem() {
4747
// Set can timeout. Because this project only sets parameters once on
4848
// construction, the timeout can be long without blocking robot operation. Code
4949
// which sets or gets parameters during operation may need a shorter timeout.
50-
// --8<-- [start: can-timeout]
50+
// --8<-- [start:can-timeout]
5151
leftLeader.setCANTimeout(250);
5252
rightLeader.setCANTimeout(250);
5353
leftFollower.setCANTimeout(250);
5454
rightFollower.setCANTimeout(250);
55-
// --8<-- [end: can-timeout]
55+
// --8<-- [end:can-timeout]
5656

5757
// Create the configuration to apply to motors. Voltage compensation
5858
// helps the robot perform more similarly on different
5959
// battery voltages (at the cost of a little bit of top speed on a fully charged
6060
// battery). The current limit helps prevent tripping
6161
// breakers.
62-
// --8<-- [start: voltage-compensation]
62+
// --8<-- [start:voltage-compensation]
6363
SparkMaxConfig config = new SparkMaxConfig();
6464
config.voltageCompensation(12);
6565
config.smartCurrentLimit(DRIVE_MOTOR_CURRENT_LIMIT);
66-
// --8<-- [end: voltage-compensation]
66+
// --8<-- [end:voltage-compensation]
6767

6868
// Set configuration to follow each leader and then apply it to corresponding
6969
// follower. Resetting in case a new controller is swapped
7070
// in and persisting in case of a controller reset due to breaker trip
71-
// --8<-- [start: follower-config]
71+
// --8<-- [start:follower-config]
7272
config.follow(leftLeader);
7373
leftFollower.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters);
7474
config.follow(rightLeader);
7575
rightFollower.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters);
76-
// --8<-- [end: follower-config]
76+
// --8<-- [end:follower-config]
7777

7878
// Remove following, then apply config to right leader
79-
// --8<-- [start: right-leader-config]
79+
// --8<-- [start:right-leader-config]
8080
config.disableFollowerMode();
8181
rightLeader.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters);
82-
// --8<-- [end: right-leader-config]
82+
// --8<-- [end:right-leader-config]
8383
// Set config to inverted and then apply to left leader. Set Left side inverted
8484
// so that postive values drive both sides forward
85-
// --8<-- [start: left-inversion]
85+
// --8<-- [start:left-inversion]
8686
config.inverted(true);
8787
leftLeader.configure(config, ResetMode.kResetSafeParameters, PersistMode.kPersistParameters);
88-
// --8<-- [end: left-inversion]
88+
// --8<-- [end:left-inversion]
8989
}
9090

91-
// --8<-- [end: constructor]
91+
// --8<-- [end:constructor]
9292

9393
@Override
9494
public void periodic() {
9595
}
9696

9797
// Command factory to create command to drive the robot with joystick inputs.
98-
// --8<-- [start: drive-arcade-method]
98+
// --8<-- [start:drive-arcade-method]
9999
public Command driveArcade(DoubleSupplier xSpeed, DoubleSupplier zRotation) {
100100
return this.run(
101101
() -> drive.arcadeDrive(xSpeed.getAsDouble(), zRotation.getAsDouble()));
102102
}
103-
// --8<-- [end: drive-arcade-method]
103+
// --8<-- [end:drive-arcade-method]
104104
}

docs/programming/AKitStructureReference.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
---
2-
title: AdvantageKit Reference
3-
layout: default
4-
nav_order: 11
5-
parent: architecture
6-
---
71
# AdvantageKit Code Structure Reference
82

93
This document contains a quick reference for how we structure our code.
@@ -114,7 +108,7 @@ We can add all of these values into our `IntakeIOInputs` class.
114108
Finally, add a `updateInputs(IntakeIOInputs inputs)` method that our `IOImplementation`s can call to record these values.
115109
Our `IntakeIO` file should look something like this now:
116110

117-
```Java
111+
```java
118112
// Imports go here
119113

120114
public interface IntakeIO {
@@ -157,7 +151,7 @@ This will contain all of the hardware we want to interact with on the real robot
157151
First, we will need to define the hardware we want to use.
158152
In this case, they will be two `TalonFX`s.
159153

160-
```Java
154+
```java
161155
private final TalonFX pivot = new TalonFX(IntakeSubsystem.PIVOT_MOTOR_ID);
162156
private final TalonFX roller = new TalonFX(IntakeSubsystem.ROLLER_MOTOR_ID);
163157
```
@@ -168,7 +162,7 @@ For the sake of brevity, I won't cover that in detail here. *MAKE SUBSYSTEM WALK
168162

169163
In the end you should have something like:
170164

171-
```Java
165+
```java
172166
public class IntakeIOReal implements IntakeIO {
173167
private final TalonFX pivot = new TalonFX(IntakeSubsystem.PIVOT_MOTOR_ID);
174168
private final TalonFX roller = new TalonFX(IntakeSubsystem.ROLLER_MOTOR_ID);
@@ -213,7 +207,7 @@ It will also contain Command factories to allow the rest of our code to interfac
213207

214208
Add the io and io inputs to the class:
215209

216-
```Java
210+
```java
217211
// Snip imports
218212

219213
public class IntakeSubsystem extends SubsystemBase {
@@ -229,7 +223,7 @@ public class IntakeSubsystem extends SubsystemBase {
229223

230224
Then we can add a few Command factories to control the subsystem:
231225

232-
```Java
226+
```java
233227
public Command intake(double volts) {
234228
return Commands.run(() -> {
235229
io.setAngle(INTAKE_ANGLE);
@@ -247,7 +241,7 @@ public Command stop() {
247241

248242
Finally, let's add our `periodic()` method to update and log our inputs.
249243

250-
```Java
244+
```java
251245
@Override
252246
public void periodic() {
253247
io.updateInputs();
@@ -258,7 +252,7 @@ public void periodic() {
258252

259253
Overall, `IntakeSubsystem` should roughly look like:
260254

261-
```Java
255+
```java
262256
// Snip imports
263257

264258
public class IntakeSubsystem extends SubsystemBase {

docs/programming/AdvantageKit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ While this does require some additional effort to write subsystems, it also make
5353

5454
### Exercises
5555

56-
- Follow this [tutorial](2.8_KitbotAKitRefactor.md) to add AdvantageKit to your kitbot code.
56+
- Follow this tutorial to add AdvantageKit to your kitbot code. *(coming soon)*
5757

5858
### Notes
5959

60-
- See the [AdvantageKit Structure Reference](2.7_AKitStructureReference.md) article for more on the IO layer structure
60+
- See the [AdvantageKit Structure Reference](AKitStructureReference.md) article for more on the IO layer structure
6161
- [Here](https://drive.google.com/drive/folders/1qNMZ7aYOGI31dQNAwt7rhFo97NR7mxtr) are some logs from our 2023-2024 season

docs/programming/autonomous.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ In this section we will be going over:
3535

3636
!!! summary ""
3737
**2)** Before the constructor create a **double** called **distance**
38-
```Java
38+
```java
3939
private Double distance;
4040
```
4141

4242
- We will use this to tell the command to finish when the robot drives the inputted distance
4343

4444
**3)** Also create a **Timer** called `runtime`.
4545
46-
```Java
46+
```java
4747
private Time runTime;
4848
```
4949

0 commit comments

Comments
 (0)