-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
@@ -98,6 +98,7 @@ public void teleopInit() { | |||
if (autonomousCommand != null) { | |||
autonomousCommand.cancel(); | |||
} | |||
robotContainer.shooter.stop(); |
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.
why stop shooter on teleop init?
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.
Oh that's left over from testing. Since the closed loop setpoints are stored persistently on the Falcons, if I were to set the motor speed and then disable the robot, when I reenable the shooter would immediately spin up to the previous speed, which is not always desirable. This would probably get fixed by commands, so I'll remove it.
private final AverageFilter averageFilter = new AverageFilter(20); // TODO: 11/28/2023 tune filter size | ||
|
||
private double setpoint = 0; | ||
private boolean isClosedLoop = false; |
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.
ok but actually why do you need this variable? It's only used in isAtSetpoint
to return false, which presumably would go unused when you're not trying to do closed loop control
Shooter subsystem code, no commands yet since indexer code isn't done