Skip to content
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
wants to merge 104 commits into
base: loggings
Choose a base branch
from

Conversation

erickrause
Copy link
Contributor

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 any CANSparkMax 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.

SIMpleTillComplex and others added 30 commits January 27, 2024 08:21
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 IdrTin force-pushed the ek/logging-refactor branch from 0abfdc0 to f46e818 Compare February 16, 2024 16:25
SamMcph and others added 11 commits February 16, 2024 12:39
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 IdrTin force-pushed the ek/logging-refactor branch from cde5335 to e8ade10 Compare February 16, 2024 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants