Finding Fixes in the Rewrite Dry Run#581
Conversation
There was a problem hiding this comment.
This PR modernizes switch statements throughout the codebase and adds missing @OverRide annotations — good cleanup overall. However, there is one critical breaking change in WoodBotDrivetrain.TunerSwerveDrivetrain that would cause CompBot and PracticeBot to silently use WoodBot's drivetrain constants at runtime.
| TalonFX::new, | ||
| TalonFX::new, | ||
| CANcoder::new, | ||
| WoodBotDrivetrain.drivetrainConstants, |
There was a problem hiding this comment.
Breaking change affecting all robot configs. This constructor now ignores its drivetrainConstants parameter and hardcodes WoodBotDrivetrain.drivetrainConstants. Since CommandSwerveDrivetrain extends WoodBotDrivetrain.TunerSwerveDrivetrain (see CommandSwerveDrivetrain.java line 40), every config (CB, PB, WB, SIM) that creates a CommandSwerveDrivetrain passes its own constants through super() — but those constants are now silently discarded here. CompBot and PracticeBot would use WoodBot CAN bus name, Pigeon2 ID, etc. Change this back to drivetrainConstants (the parameter).
| TalonFX::new, | ||
| CANcoder::new, | ||
| drivetrainConstants, | ||
| WoodBotDrivetrain.drivetrainConstants, |
There was a problem hiding this comment.
Same issue: the drivetrainConstants parameter is ignored here too. Note the 4-arg constructor at line 325 was left unchanged and correctly passes the parameter through — the inconsistency suggests lines 282 and 305 were unintentionally changed. Change back to drivetrainConstants (the parameter).
No description provided.