gavinlyonsrepo / TM1638plus

An Arduino library to drive TM1638 seven segment modules.
https://gavinlyonsrepo.github.io/
GNU General Public License v3.0
79 stars 25 forks source link

Fix to displayHex logical error #19

Closed hastypete closed 2 years ago

hastypete commented 2 years ago

By doing a mod on the 'hex' parameter it allows function to properly handle integers past 15. Fixes https://github.com/gavinlyonsrepo/TM1638plus/issues/18 This has been tested on Arduino UNO and Arduino Mega.
It works with any integer now and always displays the correct digit.

centic9 commented 2 years ago

The else-if on line 142 is then not needed any more.

gavinlyonsrepo commented 1 year ago

This is now implemented in Version 1.9.0