Closed mcolinj closed 5 years ago
The main principal at work here is to avoid duplicated information. If we find out that electrical has wired things backward, we ought to be able to change the code in a single place in order to fix the problem. If various sign manipulations are in several, separate locations in the code, then we risk missing one. We can avoid that potential problem by being careful with how we represent the information about the robot.
See if you can figure out how to record the working motor direction is a single place. (and then use that to derive all other values)
The current design of the BallManipulator uses a positive constant for the SPIT_SPEED and then reverses the sign when using it. If that was changed, so the constant was negative, the BallManipulatorController would return the correct value.