bremme / arduino-tm1637

Arduino library for using a 4 digit seven segment display with TM1636 or TM1637 driver IC
GNU General Public License v2.0
164 stars 62 forks source link

printLevelVertical only prints double bars, never single bars #59

Open tofof opened 2 years ago

tofof commented 2 years ago

The logic for printing single bars is erroneous; the condition will always be false when that code is reached (>=0 has to be false already, so obviously >=1 will be false).

This can be easily verified using the FunPrintLevel example and changing the step size to 1, along with a Serial.print of the current level. The first bar should draw at 13, but no bars appear until a double bar at 25, and then another double bar at 50, etc.

Fixed by included PR #58.