avishorp / TM1637

Arduino library for TM1637 (LED Driver)
GNU Lesser General Public License v3.0
427 stars 218 forks source link

Add support for negative integers with leading zeros and floating point numbers #97

Open JonathanLindsey opened 1 year ago

JonathanLindsey commented 1 year ago

This adds support for

  1. Negative integers with leading zeros
  2. Floating point numbers

Notes for floating point numbers

  1. This assumes the display has exactly 4 digits.
  2. Only supports use of the colon (not decimal points) for now. Implementation theoretically allows for decimal points to be added later without breaking changes. - I can't get the displays I bought to show decimal points.
  3. When -1 < num < 1 and leading_zero is false, superfluous leading zeros may be shown. This is documented with a note that this behavior may change in the future.
  4. Implementation does not include length and pos arguments but these can theoretically be added in the future without breaking changes.
JonathanLindsey commented 1 year ago

There are some things I want to change/fix before this gets merged.

If you think LO__ or nAn_ should be right justified, let me know.