@@ -194,7 +194,7 @@ class ControlConfig:
194
194
"""Base ControlConfig"""
195
195
196
196
def get_cfg_json (self ) -> str :
197
- """Returns the CFG str for the control called when the iotdashboard app asks for a CFG
197
+ """Returns the CFG str for the control called when the **Dash** app asks for a CFG
198
198
199
199
Parameters
200
200
----------
@@ -211,7 +211,7 @@ def get_cfg_json(self) -> str:
211
211
return cfg_str
212
212
213
213
def get_cfg64 (self ) -> dict :
214
- """Returns the CFG dict for the control called when the iotdashboard app asks for a CFG
214
+ """Returns the CFG dict for the control called when the **Dash** app asks for a CFG
215
215
216
216
Parameters
217
217
----------
@@ -304,11 +304,11 @@ class Control():
304
304
"""Base class for controls. """
305
305
306
306
def get_state (self ) -> str :
307
- """This is called by iotdashboard app. Controls need to implement their own version."""
307
+ """This is called by **Dash** app. Controls need to implement their own version."""
308
308
return ""
309
309
310
310
def get_cfg (self , data ) -> list :
311
- """Returns the CFG str for the control called when the iotdashboard app asks for a CFG
311
+ """Returns the CFG str for the control called when the **Dash** app asks for a CFG
312
312
313
313
Parameters
314
314
----------
@@ -337,7 +337,7 @@ def get_cfg(self, data) -> list:
337
337
return cfg_list
338
338
339
339
def get_cfg64 (self , data ) -> list :
340
- """Returns the CFG dict for the control called when the iotdashboard app asks for a CFG
340
+ """Returns the CFG dict for the control called when the **Dash** app asks for a CFG
341
341
342
342
Parameters
343
343
----------
@@ -381,7 +381,7 @@ def add_receive_message_callback(self, callback):
381
381
self ._message_rx_event += callback
382
382
383
383
def remove_receive_message_callback (self , callback ):
384
- """Remaove a callback from receive incoming messages to the control."""
384
+ """Remove a callback from receive incoming messages to the control."""
385
385
self ._message_rx_event -= callback
386
386
387
387
def add_transmit_message_callback (self , callback ):
@@ -392,12 +392,12 @@ def remove_transmit_message_callback(self, callback):
392
392
"""Remove a callback for transmitted messages from the control."""
393
393
self ._message_tx_event -= callback
394
394
395
- def __init__ (self , cntrl_type : str , control_id : str ):
395
+ def __init__ (self , ctrl_type : str , control_id : str ):
396
396
"""Control base type - all controls have these characteristics and methods.
397
397
398
398
Parameters
399
399
----------
400
- cntrl_type : str
400
+ ctrl_type : str
401
401
The type of control to implement
402
402
control_id : str
403
403
An unique control identity string. The control identity string must be a unique string for each control per device
@@ -412,15 +412,15 @@ def __init__(self, cntrl_type: str, control_id: str):
412
412
self ._is_active = False
413
413
414
414
self ._cfg_max_no_columns = 3
415
- self .cntrl_type = cntrl_type .translate (BAD_CHARS )
415
+ self .ctrl_type = ctrl_type .translate (BAD_CHARS )
416
416
self .control_id = control_id .translate (BAD_CHARS )
417
417
if not self .control_id :
418
418
raise ValueError ('control_id cannot be an empty string' )
419
419
self ._message_rx_event = Event ()
420
420
self ._message_tx_event = Event ()
421
421
# This may break things but makes all controls able to be setup from tasks.
422
422
self ._message_rx_event += self ._message_tx_event
423
- self ._control_hdr_str = f"\t {{device_id}}\t { self .cntrl_type } \t { self .control_id } \t "
423
+ self ._control_hdr_str = f"\t {{device_id}}\t { self .ctrl_type } \t { self .control_id } \t "
424
424
425
425
def del_config (self , column_no = 1 ):
426
426
"""Deletes all the columnar config layout entries"""
0 commit comments