platisd / nokia-5110-lcd-library

Arduino library for driving the Nokia 5110 LCD
MIT License
20 stars 7 forks source link

print(123.00) outputs "123.000" (extra 0 at the end) #25

Closed JPTa closed 10 months ago

JPTa commented 10 months ago

https://github.com/platisd/nokia-5110-lcd-library/blob/cc069feab8c81ecf2b46c277cbcb8f0da7b2256c/src/Nokia_LCD.cpp#L374

When 'fractional' is zero it is not necessary to print it out at the end:

https://github.com/platisd/nokia-5110-lcd-library/blob/cc069feab8c81ecf2b46c277cbcb8f0da7b2256c/src/Nokia_LCD.cpp#L383

platisd commented 10 months ago

If I understood right, the proposed pull request (#26) will fix your issue. Do you agree?

JPTa commented 10 months ago

Yeah, that fixes it.

platisd commented 10 months ago

Thank you for reporting the issue :+1: