This repository was archived by the owner on Jan 13, 2025. It is now read-only.
add support for multiple PID slots in MotorController#49
Open
dejabot wants to merge 5 commits into
Open
Conversation
if PID values are set via config, support live refreshes of these values when set() is called.
98510ec to
27717a5
Compare
4 tasks
rcahoon
reviewed
Mar 15, 2024
| final ControlMode mode, final double value, int slot, double arbitraryFeedForward) { | ||
| switch (mode) { | ||
| case PercentOutput: | ||
| delegate.set(mode, value); |
Member
There was a problem hiding this comment.
should these other control modes also pass along the slot and arbFF?
|
|
||
| @Override | ||
| public void setOutputRange(final double minOutput, final double maxOutput, int slot) { | ||
| if (slot != 0) { |
Member
There was a problem hiding this comment.
the behavior might be confusing to the user - if an output range is set on Slot 0 but not on Slot 1, then the range bound will apply to both slots without warning the user
| .logRaw( | ||
| Severity.WARNING, | ||
| "Ignoring slot for setOutputRange - unsupported on Talon"); | ||
| } |
Member
There was a problem hiding this comment.
potentially confusing behavior, as above
|
|
||
| @Override | ||
| public void set(final ControlMode mode, double value) { | ||
| public void set(final ControlMode mode, double value, int slot, double arbitraryFeedForward) { |
Member
There was a problem hiding this comment.
should this have m_device.selectProfileSlot like in CANVictorMotorController?
| .logRaw( | ||
| Severity.WARNING, | ||
| "Ignoring slot for setOutputRange - unsupported on Talon"); | ||
| } |
Member
There was a problem hiding this comment.
potentially confusing behavior, as above
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
MotorController.LocalMotorControllersetis called.followwrt inverting the follower motor.How Has This Been Tested?
Needs testing. Sending for early feedback.