Add StatusSignalRefresher and update MotorIOTalonFX to use it#249
Merged
Add StatusSignalRefresher and update MotorIOTalonFX to use it#249
Conversation
1 task
godmar
approved these changes
Mar 2, 2026
Contributor
godmar
left a comment
There was a problem hiding this comment.
Easy enough. Good to have confirmation from another team.
Could be further optimized.
| * @param signal A BaseStatusSignal to add | ||
| */ | ||
| public static void addSignal(CANBus bus, BaseStatusSignal signal) { | ||
| if (!canBusToSignalsMap.containsKey(bus)) { |
godmar
requested changes
Mar 2, 2026
Contributor
godmar
left a comment
There was a problem hiding this comment.
I think it can be more optimized a bit
godmar
approved these changes
Mar 2, 2026
| * CommandScheduler.getInstance().run()} in the robot periodic to work properly. | ||
| */ | ||
| public static void refreshAll() { | ||
| if (canBusToSignalsMap.isEmpty()) { |
Contributor
There was a problem hiding this comment.
This check is redundant. If canBusToSignalsMap is empty, then buses.length == 0 and the next loop will be skipped.
godmar
added a commit
that referenced
this pull request
Mar 2, 2026
(this is logically part of #249)
aidnem
added a commit
that referenced
this pull request
Mar 3, 2026
* (#246) Add arbitrary feedforward support * (#246) Rename arbitrary to supplemental, fix typo in javadoc mixing up spark with talon * (#246) Name back to arbitrary at preston's request * (#246) Add arb FF voltage option for SparkMax IOs * (#249) removed redundant if() in refreshAll (this is logically part of #249) --------- Co-authored-by: Godmar Back <godmar@gmail.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.
Adds a StatusSignalRefresher based on team422's CtreBaseRefreshManager.
Updates MotorIOTalonFX to use this signal refresher.