pololu / libpololu-avr

The Pololu AVR C/C++ Library makes it easier to get started programming your Orangutan Robot Controller or 3pi Robot.
http://www.pololu.com/docs/0J20
Other
43 stars 39 forks source link

PololuWheelEncoders is broken #1

Closed DavidEGrayson closed 9 years ago

DavidEGrayson commented 9 years ago

PololuWheelEncoders does not work properly, causing it to miss half of all the encoder counts, as reported here:

http://forum.pololu.com/viewtopic.php?p=43553#p43553

The problem was introduced in commit 70f85f0.

We should be able to fix it by adding ? 1 : 0 after any call to isInputHigh. Also, it might be good to use "bool" for all variables that are supposed to represent booleans.