Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .idea/runConfigurations/deploySloth.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FTC robot controller code for **VC Silver Circuits (Team 16158)** for the 2025-2
- [Teleop Controls](#teleop-controls)
- [Autonomous Sequences](#autonomous-sequences)
- [Tuning Parameters](#tuning-parameters)
- [Hot Reload with Sloth](#hot-reload-with-sloth)

---

Expand Down Expand Up @@ -319,3 +320,29 @@ Mirrors the Blue auto using coordinate flipping (`flipX` / `flipHeading` helpers
4. Run `Tuning` OpMode to verify PedroPathing constants for the current robot.
5. Run `MotifScannerAuto` in pre-match to detect and store the motif pattern before running teleop.
6. For competition matches, run the appropriate auto first, then select the matching alliance teleop — pose is automatically transferred via `PoseStorage`.

---

## Hot Reload with Sloth

This project uses [Sloth](https://github.com/Dairy-Foundation/Sloth) for hot code reloading. Instead of a full 40+ second APK install, Sloth pushes only changed TeamCode classes to the robot in under 2 seconds.

### Daily workflow

1. Make code changes in `TeamCode`
2. Run the **`deploySloth`** run configuration in Android Studio
3. Restart the OpMode on the Driver Hub — changes are live immediately

### Full install (required when)

- Adding or updating library dependencies
- Modifying files outside of `TeamCode` (e.g. `build.gradle`, `FtcRobotController`)
- First-time setup on a new robot

For a full install, run `removeSlothRemote` first (added as a "Before launch" step in the TeamCode run config), then do a normal build & deploy.

### Notes

- Only classes under `org.firstinspires.ftc.teamcode` are hot-reloaded
- Classes annotated with `@Pinned` are excluded from hot reload and always require a full install
- Sloth changes survive robot restarts and power cycles
11 changes: 11 additions & 0 deletions TeamCode/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@

// Custom definitions may go here

buildscript {
repositories {
mavenCentral()
maven { url "https://repo.dairy.foundation/releases" }
}
dependencies {
classpath "dev.frozenmilk:Load:0.2.4"
}
}

// Include common definitions from above.
apply from: '../build.common.gradle'
apply from: '../build.dependencies.gradle'
apply plugin: 'dev.frozenmilk.sinister.sloth.load'

android {
namespace = 'org.firstinspires.ftc.teamcode'
Expand Down
4 changes: 3 additions & 1 deletion build.dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ repositories {
mavenCentral()
google() // Needed for androidx
maven { url = "https://mymaven.bylazar.com/releases" }
maven { url = "https://repo.dairy.foundation/releases" }
}

dependencies {
Expand All @@ -17,6 +18,7 @@ dependencies {

implementation 'com.pedropathing:ftc:2.0.5'
implementation 'com.pedropathing:telemetry:1.0.0'
implementation 'com.bylazar:fullpanels:1.0.9'
implementation 'com.bylazar.sloth:fullpanels:0.2.4+1.0.12'
implementation 'dev.frozenmilk.sinister:Sloth:0.2.4'
}

Loading