Things to do when the season starts:
1 - Get the config off the driver hub and into the main codebase for 0 risk of losing the config in a wipe.
- Steps to get the config
- Wire up the swerve pods and build the hardware config the normal way, through the Driver
Station's "Configure Robot" wizard. Name it something lowercase/numbers/underscores only,
e.g.
swerve_config(that name is what shows up in the config picker). - Pull the resulting XML off the Control Hub. Either:
adb pull /sdcard/FIRST/swerve_config.xml(connect viaadb connect 192.168.43.1:5555while on the hub's Program & Manage wifi network), or- browse to it through the Control Hub's web manager at
192.168.43.1:8080, or - a file manager app if going through the Driver Hub tablet directly.
- Drop that file into
TeamCode/src/main/res/xml/swerve_config.xmlin this repo (same mechanism already used forteamwebcamcalibrations.xmlin that folder). - Commit it to git.
- From then on, any deploy (
Run -> Team Codein Android Studio) auto-installs that XML back onto whatever hub is connected, at/sdcard/FIRST/swerve_config.xml. A wiped or swapped Control Hub gets the exact same config back the next time code is pushed to it, no need to redo the wizard. - After a wipe, double check the config shows as selected on the Driver Station (pick it once from "Configure Robot" if it isn't auto-selected) before trusting it.
- Sanity check the pulled file against
pedroPathing/Constants.java: it should declare motors namedsm0-sm3, continuous rotation servosss0-ss3, analog inputsse0-se3, and an I2C device namedpinpoint(not on I2C port 0, that's the Control Hub's built-in IMU).
- Wire up the swerve pods and build the hardware config the normal way, through the Driver
Station's "Configure Robot" wizard. Name it something lowercase/numbers/underscores only,
e.g.
2 - Ensure wiring is the same as @swervewiring.png