-
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
Current Dashboard #82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also write code that can stop the arm from moving if it draws over a certain level of current
try (PowerDistribution PDH = new PowerDistribution(1, ModuleType.kRev)) { | ||
tab.addDouble("Right Arm Motor Current",()-> PDH.getCurrent(18)); | ||
tab.addDouble("Left Arm Motor Current",()-> PDH.getCurrent(5)); | ||
} catch(Exception e){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what can throw an exception here?
tab.addDouble("Right Arm Motor Current",() -> PDH.getCurrent(18)); | ||
tab.addDouble("Left Arm Motor Current",() -> PDH.getCurrent(5)); | ||
//Shooter Motors | ||
tab.addDouble("Shooter Motor 1 Current",() -> PDH.getCurrent(6)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make a TEMPORARY (like, we are going toi delete it before merging this) command for the shooter subsystem that takes in a can id and runs the motor for that can id at like 10%. Then we can watch this dashboard and know whiuch PD channel corresponds to each can ID. Then record that in Constants and delete the temp command.
if (currentNeedsInit){ | ||
ShuffleboardTab tab = Shuffleboard.getTab("Current Info"); | ||
//Arm Motors | ||
tab.addDouble("Right Arm Motor Current",() -> PDH.getCurrent(18)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these PDH channels used in the getCurrent
calls should be defined in Constants (maybe make a PDH class in constants to store them)
Get current values from the PDH and display them on a dashboard.