Repository navigation
Conversation
FaultLogger (#20): cache CTRE fault signals at register time and refresh them with one refreshAll per CAN bus instead of ~59 single refreshes. Console, DogLog and NT output now fire only when the active fault set changes (DogLog faults also clear now). A failed per-bus refresh reports a "Fault Signals Not Received" fault. clear() republishes NT. Fault polling is re-enabled at 1 s. CANivore stats (#19): FaultLogger.register(CANBus) logs bus utilization, bus-off, TX-full, REC and TEC, and faults when the bus status is not OK. Swerve registers the swerve CANivore. Vision: PhotonLib 2026 reports every visible tag as used; filter the used tags in place (fix found by 340). Fall back from multi-tag to trig solve, which now only disambiguates between the two PnP poses. Feed heading at each result's timestamp, skip results using tags missing from our layout, and log camera rotation error (from 4481). Swerve: driver POV-up toggles defense mode (higher drive stator/supply limits and driver speeds), with normal limits cached at boot and restored on exit/disable; unreachable motors are skipped so a toggle can't stall the loop. Add getFilteredChassisSpeeds() (5-sample moving average); getChassisSpeeds() stays raw. Co-Authored-By: Claude Opus 5.5 <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.
Summary
refreshAllper CAN bus instead of about 59 separate refreshes.addPeriodic(FaultLogger::update, 1)had been commented out).FaultLogger.register(CANBus)logs utilization, bus-off, TX-full, REC and TEC underCANBus/<name>/, and raises an ERROR when the bus status is not OK. Swerve registers the swerve CANivore.Vision/Camera Rotation Error/.getFilteredChassisSpeeds()(5-sample moving average).getChassisSpeeds()stays raw becausedriveToseeds from it.Behaviour changes to know
FaultLogger.report()output (console, DogLog, NT) now appears at the nextupdate()poll, up to 1 s later. Characterization results like "Chassis MOI" print late.CANBus (<bus>)- Fault Signals Not Receivedmeans a device or bus isn't sending its fault frames. It names the bus, not the device.defenseSlipCurrent(120 A) currently equals the untunedfrontSlipCurrentplaceholder, so until that's tuned defense only raises the rear modules' stator limit.calculateMotorMaxSpeedAndTorquereads the live stator limit, so don't run it enabled while defense is on.Testing
./gradlew buildpasses: 30 tests, 1 skipped (RobotTest, already@Disabled), 0 failures. New tests areFaultLoggerTest(5),SwerveDefenseModeTest, andVisionPoseEstimatorTest.multiTagIgnoresUnknownTag.devicesOnTwoBusesPollfails if signals are refreshed across buses.simulateJavarun had no exceptions, and each fault printed once.FaultLogger.update()went from ~364 µs to ~64 µs over 13 sim devices. That figure is rough: tests disable DogLog and the console, and a desktop isn't a roboRIO.Needs real-robot verification
Timing/FaultLogger/update()on the roboRIO. FaultLogger update() method takes too long. #20 should close only after this.Defense Modereturns to false and the limits are restored.defenseSlipCurrentabove the tuned front and rear slip currents.#2 (CameraServer noise in vision tests) is unchanged. It is an upstream
PhotonCameraSimlistener race, and tests still pass.🤖 Generated with Claude Code