add auto-only drive current limit#147
Conversation
🤖 Augment PR SummarySummary: Adds an autonomous-only drive-motor supply current limit to balance drivetrain performance vs. brownout risk. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
| public void autonomousPeriodic() {} | ||
|
|
||
| @Override | ||
| public void autonomousExit() { |
There was a problem hiding this comment.
autonomousExit() is the only place that restores the default supply current limit; if that hook doesn’t run for any reason (unexpected restart / mode transition behavior), the higher auto limit could persist into teleop. Is there a reason you’re not also ensuring the default limit is restored on other transitions?
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
|
|
||
| // Apply to all modules' drive motors | ||
| for (var module : getModules()) { | ||
| module.getDriveMotor().getConfigurator().apply(currentLimitsConfig); |
There was a problem hiding this comment.
getConfigurator().apply(currentLimitsConfig) returns a status, but it’s ignored here; if CAN config application fails, the robot may silently keep the wrong current limit. That can make brownout/current-limit issues harder to diagnose in the pits.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
No description provided.