Conversation
Reads per-subsystem current from the TalonFX motors by CAN ID (no PDH channel mapping). New self-contained frc.robot.power package + RobotContainer wiring. Publishes to NetworkTables, a Power (motors) Shuffleboard tab, and DataLog; also opens the REV PDH for full-system total + bus voltage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a per-subsystem power monitor that reads current from the motor controllers by CAN ID (6328 / AdvantageKit style) — no PDH channel mapping or wire tracing. Runs alongside existing code; nothing is replaced.
Files
frc/robot/power/(new, self-contained — no dependency onConstants.java):MotorCurrentMonitor— sums per-subsystem motor current; publishes to NetworkTables + a "Power (motors)" Shuffleboard tab + DataLog; also opens the REV PDH for full-system total (PdhTotalCurrent) + bus voltage.BatteryEstimator(Thevenin + Peukert + Kalman SOC),BreakerThermalModel(Miner's-rule breaker heat),FinanceDepartment(dynamic drive-current allocation),PowerConstants(thresholds).RobotContainer.java— adds apowerMonitorfield +configurePowerMonitor()that registers every TalonFX by CAN ID / bus, called on the real robot.Motor map (pulled from this robot's config)
CanivorerioHow to test
Deploy, enable, run each mechanism → its bar moves in the "Power (motors)" Shuffleboard tab and under NetworkTables
PowerMonitor/. DataLog under/power/for AdvantageScope.Notes
PdhTotalCurrentgives the true system total incl. non-motor loads../gradlew compileJavasucceeds on this branch.🤖 Generated with Claude Code