Ok, this one is
really weird.
So after the SFL regional (or at the regional, really) our shooter stopped holding position while getting ready to shoot, which would cause it to go up or down REALLY fast because of the force of the spinning shooter wheels (we have a U shaped shooter similar to 987). I couldn't figure out why this problem was happening as I was really busy with drive coaching at this event.
After World's (we didn't really look into this problem as we intended to do low goaling and defense at World's only), I looked over all of our code and found the issue: we had somehow deleted the lines of code that set the motor command to the output determined by our PID loop.
Now this is where is gets weird
By doing so, we actually ended up saving our robot... In that same code examination I realized that the other programmer, in an effort to make our code more concise, was now using the exact same variable for our shooter RPM goal and our angular Goal for the shooter. In other words, if we would have gone to position and then set the flywheels to our shooting speed, the goal (for BOTH!) would have been 3300 instead of the rpm's goal being 3330 and the angular goal being 80. If we had actually run the shooter like this, the shooter would have slammed down and ripped the robot's bellypan in half.
This mistake ended up being a good opportunity to teach others about testing code changes before deploying at least
