-
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
Tracks how long for the motor to reach setpoint #125
base: main
Are you sure you want to change the base?
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.
I think this works. Would also wanna see some formatting cleanup before this gets landed but - the approach seems like it'd work.
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.
Left inline comments!
@Override | ||
public void execute() { | ||
shooter.setSpeed(shooter.shooterSpeedFeetPerSecondWidget.getDouble(0)); | ||
double targetSetpoint = shooter.shooterSpeedFeetPerSecondWidget.getDouble(0); | ||
newSetpoint = targetSetpoint; |
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.
So if we're never resetting our reachSetpointCycleCounter
or isShooterComingUpToSpeed
- do we need to have a previous
/next
here? Or can we just have the single setpoint?
Doing the zeroing/resetting the way you were doing is fine. You'd only have to move your SmartDashboard.putNumber
back in to that if (isShooterComingUpToSpeed
block for that to still work.
Either approach is fine here IMO. I don't know if at this point in time we'll be like, holding the button to start the shooter and changing the values on the slider. I think it's more likely we'll set the value in code and then want to see how long the shooter takes to get up to speed between StartShooter
calls.
No description provided.