ToughTechs151 / ChargedUp2023

Other
1 stars 0 forks source link

Put Arm's ProfiledPIDController on the Shuffleboard #13

Open blu28 opened 1 year ago

blu28 commented 1 year ago

All sendables should be on the Shuffleboard.

This one is a little bit tricky, since the controller is passed into the superclass constructor without assigning it. The super call must be the first statement in the constructor, so assigning it in the constructor before calling super is out. Making it a private field might be possible, but it can't be an instance object since instance objects don't get instantiated until after the constructor is run. It might be possible to make it a class object with static.

Another approach would be to create it in RobotContainer and pass it in as a constructor parameter. This follows the same signature as the superclass, so it seems logical.

Another approach would be to see if it is possible to retrieve the controller from the subsystem after it is constructed.

blu28 commented 1 year ago

Of course, we would also want the ArmPidSubsystem on the Shuffleboard. Perhaps a class that is an extension of the class ProfiledPIDSubsystem will automatically put the controller on the Shuffleboard if the subsystem is placed there?

VeraMangahas commented 1 year ago

The PID was put on the shuffleboard yesterday so that part is completed. However, it was asked to be displayed as % to be more user-friendly, so that is the next step to be completed.