Closed cpostbitbuckets closed 2 years ago
I think that the problem is that you're both setting the state of the BMS in teleopPeriodic and using the buttons. Those two might be fighting over the state of the system and making it misbehave.
As always, the correct solution is to avoid this sort of bug in the first place and write a fully specified finite state machine describing the system's desired behavior. But you might get away with removing the button manually controlling the BMS here. You'll also want to fix the logic so that the BMS (and feeder, I guess) doesn't run whenever the shooter is turned on and up to speed, but so it runs when those conditions are met AND the shoot button is pressed.
Let me know if those changes fix the problem!
fixed in #118
This should be closed
After testing, we realized the isUpToSpeed was only stopping the feeder motor, not the BMS, so the BMS was still feeding balls in even if the feeder was stopped.
We added code to check isUpToSpeed and shooter state in the Robot.java and spin/stop the BMS. Something is wrong though, the BMS only twitches and then immediately stops. The feeder works correctly though...