Skip to content

Conversation

@bastiengrignon
Copy link

@bastiengrignon bastiengrignon commented Apr 28, 2021

Adding a new feature to support usage of colon (see new example)

@avishorp this could be interesting to have a new feature to this library

@riraosan
Copy link

@bastiengrignon
I like this request. It can be used in my project.
Thanks.

@bastiengrignon
Copy link
Author

bastiengrignon commented Apr 28, 2021

I'm actually using a modified version of your library for years but didn't think and took the time to make it a new feature for others.

Time has come 😄

@stef-ladefense
Copy link

I'm actually using a modified version of your library for years but didn't think and took the time to make it a new feature for others.

Time has come 😄

hi,
have tested your version support dot with your TM1637Colon exemple
don't work correctly
with dot on -> "16:45"
without dot -> "18 45"

correction :
change "writeByte(segments[k] | 0x7f); // Set colon OFF"
by -> "writeByte(segments[k] & ~0x80); // Set colon OFF"
in your "TM1637Display::setSegments" (line 111)

@stef-ladefense
Copy link

I'm actually using a modified version of your library for years but didn't think and took the time to make it a new feature for others.

Time has come 😄

see https://github.com/stef-ladefense/TM1637

@avishorp
Copy link
Owner

In the design of the library, I tried to keep it as stateless as possible (with brightness being the only exception). Your suggestion contradicts this principle. Moreover, setSegments just sends the value to the display, setting the colon on or off is just a matter of setting the right bits, there is no need for a special function to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants