@@ -273,9 +273,11 @@ class BigSeg7x4(Seg7x4):
273
273
supports displaying a limited set of characters."""
274
274
def __init__ (self , i2c , address = 0x70 , auto_write = True ):
275
275
super ().__init__ (i2c , address , auto_write )
276
+ # Use colon for controling two-dots indicator at the center (index 0)
277
+ # or the two-dots indicators at the left (index 1)
276
278
self .colon = Colon (self , 2 )
277
279
278
- def setindicator (self , index , value ):
280
+ def _setindicator (self , index , value ):
279
281
""" Set side LEDs (dots)
280
282
Index is as follow :
281
283
* 0 : two dots at the center
@@ -292,22 +294,48 @@ def setindicator(self, index, value):
292
294
if self ._auto_write :
293
295
self .show ()
294
296
295
- def getindicator (self , index ):
297
+ def _getindicator (self , index ):
296
298
""" Get side LEDs (dots)
297
299
See setindicator() for indexes
298
300
"""
299
301
bitmask = 1 << (index + 1 )
300
302
return self ._get_buffer (0x04 ) & bitmask
301
303
304
+ @property
305
+ def two_dots_center (self ):
306
+ """The two dots at the center indicator."""
307
+ return bool (self ._getindicator (0 ))
308
+
309
+ @two_dots_center .setter
310
+ def two_dots_center (self , value ):
311
+ self ._setindicator (0 , value )
312
+
313
+ @property
314
+ def top_left_dot (self ):
315
+ """The top-left dot indicator."""
316
+ return bool (self ._getindicator (1 ))
317
+
318
+ @top_left_dot .setter
319
+ def top_left_dot (self , value ):
320
+ self ._setindicator (1 , value )
321
+
322
+ @property
323
+ def bottom_left_dot (self ):
324
+ """The bottom-left dot indicator."""
325
+ return bool (self ._getindicator (2 ))
326
+
327
+ @bottom_left_dot .setter
328
+ def bottom_left_dot (self , value ):
329
+ self ._setindicator (2 , value )
330
+
302
331
@property
303
332
def ampm (self ):
304
333
"""The AM/PM indicator."""
305
- return bool (self .getindicator (3 ))
334
+ return bool (self ._getindicator (3 ))
306
335
307
336
@ampm .setter
308
337
def ampm (self , value ):
309
- self .setindicator (3 , value )
310
-
338
+ self ._setindicator (3 , value )
311
339
312
340
class Colon ():
313
341
"""Helper class for controlling the colons. Not intended for direct use."""
0 commit comments