|
Theoretically, there would be no overflow since 65025 [the largest value that would turn up in the code] is within the 65535 bit space. Alas, that does not appear to be.
I have not made specific records of the bug, but I recall that the motor outputs would move to 127 only if I pulled the joystick all the way back (p1_y = 0). The LDRILL and RDRILL variables are simply outputs from the regular one-joystick tank drive code. If the joystick is centered or pushed forward, the wheels spin at maximum speed forward. The output seems to be wired to the status of p1_wheel, since I can dial that down to 0, and the wheels would stabilize at 127 again.
Once I return to the lab on Tuesday, I can make detailed records of the PWM values that come out for a given input. Perhaps that will yield a more fruitful investigation.
|