From 693b02198fb70d078aac6f7a67f32f1577e2d587 Mon Sep 17 00:00:00 2001 From: Renie Joshi Date: Sat, 1 Aug 2026 12:24:16 -0700 Subject: [PATCH 1/3] Fix Spark Max and SystemCore casing and spacing --- .../snippets/src/main/java/sources/CommandsAndMechsPt1.java | 2 +- .../snippets/src/main/java/sources/CommandsAndMechsPt2.java | 2 +- .../stage1b/snippets/src/main/java/sources/ExampleMotor.java | 2 +- .../src/main/java/sources/SuppliersInCommandBased.java | 2 +- .../learning-course/stage1/stage1b/command-based-kitbot.mdx | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java index 993c7d25..690bb56e 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java @@ -15,7 +15,7 @@ void partialDefinitions() { // [mechanismDef] class Intake implements Mechanism { // Store any motors specific to the mechanism as private members. - // This can include TalonFX, SparkMax and/or SparkFlex instances. + // This can include TalonFX, Spark Max and/or SparkFlex instances. private final ExampleMotor motor = new ExampleMotor(); } // [/mechanismDef] diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java index fb774289..c93c6af1 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java @@ -13,7 +13,7 @@ class CommandsAndMechsPt2 { // [defaultCommand] class Intake implements Mechanism { - // Placeholder for TalonFX, SparkMax or SparkFlex + // Placeholder for TalonFX, Spark Max or SparkFlex private final ExampleMotor motor = new ExampleMotor(); public Intake() { diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java b/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java index e56e665a..fc9adb42 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java @@ -5,7 +5,7 @@ */ package sources; -/** This class acts as a stand-in for a TalonFX, SparkMax, etc. in snippets. */ +/** This class acts as a stand-in for a TalonFX, Spark Max, etc. in snippets. */ public class ExampleMotor { void setThrottle(double throttle) {} diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java b/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java index 7d2902f3..638e052b 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java @@ -72,7 +72,7 @@ public Robot() { void incorrectUsages() { // [runAtThrottleDouble] class Intake implements Mechanism { - // Placeholder for TalonFX, SparkMax or SparkFlex + // Placeholder for TalonFX, Spark Max or SparkFlex private final ExampleMotor motor = new ExampleMotor(); public Command runAtThrottle(double throttle) { diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index 0c76b472..aaa13934 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -54,7 +54,7 @@ Then, create a new file in the `mechanisms` package named `Feeder.java`. Define a class named `Feeder` that implements `Mechanism`, then add the following: 1. A private `TalonFX` motor controller object, named `motor`, with an ID of 5. - It is connected to a systemcore CANBus with ID 0. + It is connected to a SystemCore CANBus with ID 0. 2. A `feed()` command that sets the throttle of the motor to 0.75 forever. 3. An `intake()` command that sets the throttle of the motor to -1 forever. 4. An `outtake()` command that sets the throttle of the motor to 1 forever. @@ -113,7 +113,7 @@ Create a file named `IntakeLauncher.java` in the `mechanisms` package. Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the following: 1. A private `TalonFX` motor controller object, named `motor`, with an ID of 4. - It is connected to a systemcore CANBus with ID 0. + It is connected to a SystemCore CANBus with ID 0. 2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor to 0.9 forever. 3. A `intake()` command that sets throttle to 0.8 forever. 4. A `outtake()` command that sets throttle to -0.8 forever. From 59be2411a0ac6ac162d826769acec9594eb278fb Mon Sep 17 00:00:00 2001 From: Renie Joshi Date: Sat, 1 Aug 2026 13:57:41 -0700 Subject: [PATCH 2/3] Fix Spark Flex spacing --- .../snippets/src/main/java/sources/CommandsAndMechsPt1.java | 2 +- .../snippets/src/main/java/sources/CommandsAndMechsPt2.java | 2 +- .../snippets/src/main/java/sources/SuppliersInCommandBased.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java index 690bb56e..901ca17d 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java @@ -15,7 +15,7 @@ void partialDefinitions() { // [mechanismDef] class Intake implements Mechanism { // Store any motors specific to the mechanism as private members. - // This can include TalonFX, Spark Max and/or SparkFlex instances. + // This can include TalonFX, Spark Max and/or Spark Flex instances. private final ExampleMotor motor = new ExampleMotor(); } // [/mechanismDef] diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java index c93c6af1..9a1ee160 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java @@ -13,7 +13,7 @@ class CommandsAndMechsPt2 { // [defaultCommand] class Intake implements Mechanism { - // Placeholder for TalonFX, Spark Max or SparkFlex + // Placeholder for TalonFX, Spark Max or Spark Flex private final ExampleMotor motor = new ExampleMotor(); public Intake() { diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java b/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java index 638e052b..3a96c33d 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java @@ -72,7 +72,7 @@ public Robot() { void incorrectUsages() { // [runAtThrottleDouble] class Intake implements Mechanism { - // Placeholder for TalonFX, Spark Max or SparkFlex + // Placeholder for TalonFX, Spark Max or Spark Flex private final ExampleMotor motor = new ExampleMotor(); public Command runAtThrottle(double throttle) { From 8d2c955489eeadea25ed1d8d5bdc5fae8ee72b84 Mon Sep 17 00:00:00 2001 From: Renie Joshi Date: Mon, 31 Aug 2026 13:59:35 -0700 Subject: [PATCH 3/3] Implement requested changes --- .../src/main/java/sources/CommandsAndMechsPt1.java | 2 +- .../src/main/java/sources/CommandsAndMechsPt2.java | 2 +- .../snippets/src/main/java/sources/ExampleMotor.java | 2 +- .../main/java/sources/SuppliersInCommandBased.java | 2 +- lint-staged.config.mjs | 11 ++++++++--- .../getting-started/website-feature-guide.mdx | 2 +- .../learning-course/stage1/stage1a/stage-overview.mdx | 2 +- src/content/docs/resources/glossary.mdx | 2 +- src/data/glossary.ts | 2 +- 9 files changed, 16 insertions(+), 11 deletions(-) diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java index 901ca17d..993c7d25 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt1.java @@ -15,7 +15,7 @@ void partialDefinitions() { // [mechanismDef] class Intake implements Mechanism { // Store any motors specific to the mechanism as private members. - // This can include TalonFX, Spark Max and/or Spark Flex instances. + // This can include TalonFX, SparkMax and/or SparkFlex instances. private final ExampleMotor motor = new ExampleMotor(); } // [/mechanismDef] diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java index 9a1ee160..fb774289 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandsAndMechsPt2.java @@ -13,7 +13,7 @@ class CommandsAndMechsPt2 { // [defaultCommand] class Intake implements Mechanism { - // Placeholder for TalonFX, Spark Max or Spark Flex + // Placeholder for TalonFX, SparkMax or SparkFlex private final ExampleMotor motor = new ExampleMotor(); public Intake() { diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java b/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java index fc9adb42..e56e665a 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/ExampleMotor.java @@ -5,7 +5,7 @@ */ package sources; -/** This class acts as a stand-in for a TalonFX, Spark Max, etc. in snippets. */ +/** This class acts as a stand-in for a TalonFX, SparkMax, etc. in snippets. */ public class ExampleMotor { void setThrottle(double throttle) {} diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java b/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java index 3a96c33d..7d2902f3 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/SuppliersInCommandBased.java @@ -72,7 +72,7 @@ public Robot() { void incorrectUsages() { // [runAtThrottleDouble] class Intake implements Mechanism { - // Placeholder for TalonFX, Spark Max or Spark Flex + // Placeholder for TalonFX, SparkMax or SparkFlex private final ExampleMotor motor = new ExampleMotor(); public Command runAtThrottle(double throttle) { diff --git a/lint-staged.config.mjs b/lint-staged.config.mjs index c75f993b..2bbf09a9 100644 --- a/lint-staged.config.mjs +++ b/lint-staged.config.mjs @@ -1,3 +1,5 @@ +import process from 'node:process'; + /** @type {import('lint-staged').Configuration} */ export default { '**/*': (files) => `prettier --write --ignore-unknown ${files.join(' ')}`, @@ -7,9 +9,12 @@ export default { 'src/content/**/*.{md,mdx}': (files) => [ `pnpm remark ${files.join(' ')} --ext mdx --frail --no-stdout --quiet`, ], - 'examples/**/*.{java,gradle}': () => [ - `./examples/gradlew -p examples spotlessApply`, - ], + 'examples/**/*.{java,gradle}': () => { + const gradlew = process.platform === 'win32' + ? 'examples\\gradlew.bat' + : './examples/gradlew'; + return [`${gradlew} -p examples spotlessApply`]; + }, 'src/data/glossary.ts': () => [ 'pnpm generate:glossary', 'git add src/content/docs/resources/glossary.mdx', diff --git a/src/content/docs/learning-course/getting-started/website-feature-guide.mdx b/src/content/docs/learning-course/getting-started/website-feature-guide.mdx index 527180eb..b21d3b99 100644 --- a/src/content/docs/learning-course/getting-started/website-feature-guide.mdx +++ b/src/content/docs/learning-course/getting-started/website-feature-guide.mdx @@ -15,7 +15,7 @@ The following features are shown with examples to help you gain a quick understa Press the `Esc` key to minimize it again. - The website has a [glossary](/resources/glossary/) of terms related to the content. Whenever a word in that glossary is mentioned in the website, it will be underlined. - You can hover over these underlined words to get a quick definition (e.g. PDH, Spark MAX). + You can hover over these underlined words to get a quick definition (e.g. PDH, SPARK MAX). - Some information is hidden in dropdowns. Try to check most of them! diff --git a/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx b/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx index 846e732d..5a7eb183 100644 --- a/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx +++ b/src/content/docs/learning-course/stage1/stage1a/stage-overview.mdx @@ -11,7 +11,7 @@ import YouTube from '@components/YouTube.astro'; Welcome to Stage 1A! Before we can start programming, we have to fork and clone the relevant repository: -- If your team primarily uses REV electronics (such as Spark MAX motor controllers), clone [the REV template](https://github.com/frcsoftware/Stage1-Template-REV). +- If your team primarily uses REV electronics (such as SPARK MAX motor controllers), clone [the REV template](https://github.com/frcsoftware/Stage1-Template-REV). - If your team primarily uses CTRE electronics (such as Kraken motors), clone [the CTRE template](https://github.com/frcsoftware/Stage1-Template-CTRE).