Closed datruck closed 5 years ago
You're right- and the comments actually explicitly state "day will not go past 31 so only needs 4 bits." Clearly a minor error that informed the design of the whole clock and, uh, well painted it into this unfortunate corner.
I'm going to try a small hack:
draw_time_string(now.day >> 1, 4, 0, 0, lightblue if now.day & 16 else blue)
Which encodes the 5th bit into the colour of the day counter.
oof how did I not see this issue, thanks for fixing it guys.
I'm actually working on this again doing a rewrite with things I've learnt over the last 2 years
In the example binary_clock.py the implementation of day is incorrect. How can 31 days be represented by only 4 bits? 5 bits would be needed. However that would interfere with the 4 bits currently used for month. Not sure how this can be fixed.