-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moved the Shuffleboard logic down to the ShuffleBoardSubsystem #30
Open
erickrause
wants to merge
104
commits into
loggings
Choose a base branch
from
ek/logging-refactor
base: loggings
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
The next things I want to implement is to figure out to how put in that information into the path planner also the swerve subsystem. But I think that this is a good base line. We also still need to be able align with the AprilTags when we want to shoot and climb
I think this is a lot more elegant just because it's not swerve feeding into pose which feeds into swerve again
IdrTin
force-pushed
the
ek/logging-refactor
branch
from
February 16, 2024 16:25
0abfdc0
to
f46e818
Compare
Puts each motor in a listed layout with speed and position.
- Creates a new Datalog once robotInit is called (when robot turns on)
- Got it to scan for CANSparkMaxs already defined in the inputted class (in the case of a subsystem class, the for loop scans for the motor, encoder, pidcontroller, etc objects, and the if statement only lets fields that hold CANSparkMax objects) - The m_layout lays out an list of integers for each motor on the Shuffleboard - Currently having trouble with getting encoder speed and position values from the field that holds the CANSparkMax (basically, the f.getEncoder lines give out errors: the getEncoder() method is not defined for a field, and is defined for a CANSparkMax instead) Long descriptions aside, I would really appreciate some help with resolving this issue.
…ed reflection to get the field data from the child class
- Had to define a specific swerve-related method (addSwerveMotorVals()) that is similar in composition to the original function that adds vals for an ordinary subsystem - Each subsystem is now extends ShuffleboardSubsystem so that it can use methods from said class and will be able to extend SubsystemBase at the same time
- Organized functions that add vals to shuffleboard - Added gyro widget function
IdrTin
force-pushed
the
ek/logging-refactor
branch
from
February 16, 2024 19:40
cde5335
to
e8ade10
Compare
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.
and used reflection to get the field data from the child class.
Fun fact. This still won't work. I'd leave you to guess what the issue is but it's late and I'll tell you.
SwerveSubsystem
doesn't actually have anyCANSparkMax
fields.And if you try to make SwerveModule just extend ShuffleBoardSubsystem it will kind of work. However, you are going to have 4 Swerve instances all writing to the same 2 fields.
You will need to either make different tabs for each module. Or you will have to add something to the field name to distinguish it. I'd think something like
getDeviceId()
might be useful enough.