-
Notifications
You must be signed in to change notification settings - Fork 28
7-segment Print function doesn't handle multiple periods #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Not by design, looks like a bug. The second half of this conditional: Adafruit CircuitPython 3.1.2 on 2019-01-07; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board, busio
>>> import adafruit_ht16k33.segments as segments
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> disp = segments.Seg7x4(i2c)
>>> disp.fill(0)
>>> disp._push('.')
>>> disp.show()
>>> disp._get_buffer(7) & 0b01000000
0
>>> That same sequence for an instance of Adafruit CircuitPython 3.1.2 on 2019-01-07; Adafruit ItsyBitsy M4 Express with samd51g19
>>> import board, busio
>>> import adafruit_ht16k33.segments as segments
>>> i2c = busio.I2C(board.SCL, board.SDA)
>>> disp = segments.Seg14x4(i2c)
>>> disp.fill(0)
>>> disp._push('.')
>>> disp.show()
>>> disp._get_buffer(7) & 0b01000000
64
>>> |
Ok cool, I just wanted to make sure it was a bug before I worked on it. |
Yeah, you were correct. Thanks for pointing me in the right direction. The reason it wasn't is 2-fold. First buffer position 7 isn't used for this display. It's 8 for the 4th digit (see self._POSITIONS). Secondly the dot is lit with the highest bit (128). After that, a little experimentation and I got the fix working. |
Done with #34 |
I'm not sure if this is by design as the AlphaNumeric display handles this fine, but issuing a command like print with multiple dots such as in
Results in it printing
0.9
The text was updated successfully, but these errors were encountered: