Code for our 2026 robot, Marvin 19
- An additional project will be created to generate a TunerConstants file for the actual robot
This guide is intended to help us recalculate swerve zeroes and deploy them onto the robot as fast as possible.
-
Set the module’s encoder offset in
TunerConstantsto0.0→ Deploy code -
Align the module to the zero position → Bevel gear aligned → Wheel straight forward
-
Read the absolute encoder value from NetworkTables / Elastic → ex.
DogLogSwerve/FLabsEncoderPos -
Compute the offset based on this value, from the negative of the current encoder value:
offset = -(absolute encoder reading) -
Update the offset in
TunerConstants -
Deploy code again
-
Verify drive when necessary
Time:
- 2 code deployments (20-60 seconds)
- Bevel alignment, Setting offset to 0 in code, reading offset from dashboard: (10-20 seconds)