@@ -306,9 +306,11 @@ class BigSeg7x4(Seg7x4):
306
306
supports displaying a limited set of characters."""
307
307
def __init__ (self , i2c , address = 0x70 , auto_write = True ):
308
308
super ().__init__ (i2c , address , auto_write )
309
+ # Use colon for controling two-dots indicator at the center (index 0)
310
+ # or the two-dots indicators at the left (index 1)
309
311
self .colon = Colon (self , 2 )
310
312
311
- def setindicator (self , index , value ):
313
+ def _setindicator (self , index , value ):
312
314
""" Set side LEDs (dots)
313
315
Index is as follow :
314
316
* 0 : two dots at the center
@@ -325,22 +327,48 @@ def setindicator(self, index, value):
325
327
if self ._auto_write :
326
328
self .show ()
327
329
328
- def getindicator (self , index ):
330
+ def _getindicator (self , index ):
329
331
""" Get side LEDs (dots)
330
332
See setindicator() for indexes
331
333
"""
332
334
bitmask = 1 << (index + 1 )
333
335
return self ._get_buffer (0x04 ) & bitmask
334
336
337
+ @property
338
+ def two_dots_center (self ):
339
+ """The two dots at the center indicator."""
340
+ return bool (self ._getindicator (0 ))
341
+
342
+ @two_dots_center .setter
343
+ def two_dots_center (self , value ):
344
+ self ._setindicator (0 , value )
345
+
346
+ @property
347
+ def top_left_dot (self ):
348
+ """The top-left dot indicator."""
349
+ return bool (self ._getindicator (1 ))
350
+
351
+ @top_left_dot .setter
352
+ def top_left_dot (self , value ):
353
+ self ._setindicator (1 , value )
354
+
355
+ @property
356
+ def bottom_left_dot (self ):
357
+ """The bottom-left dot indicator."""
358
+ return bool (self ._getindicator (2 ))
359
+
360
+ @bottom_left_dot .setter
361
+ def bottom_left_dot (self , value ):
362
+ self ._setindicator (2 , value )
363
+
335
364
@property
336
365
def ampm (self ):
337
366
"""The AM/PM indicator."""
338
- return bool (self .getindicator (3 ))
367
+ return bool (self ._getindicator (3 ))
339
368
340
369
@ampm .setter
341
370
def ampm (self , value ):
342
- self .setindicator (3 , value )
343
-
371
+ self ._setindicator (3 , value )
344
372
345
373
class Colon ():
346
374
"""Helper class for controlling the colons. Not intended for direct use."""
0 commit comments