reset() added to command.

minor delay added to login (give time for first incoming packet).
This commit is contained in:
onyx-and-iris 2022-07-16 21:52:41 +01:00
parent a86a25ca8f
commit 1f522b997e
3 changed files with 8 additions and 2 deletions

View File

@ -70,6 +70,7 @@ class VbanCmd(metaclass=ABCMeta):
self._public_packet = self._get_rt()
worker2 = Thread(target=self._updates, daemon=True)
worker2.start()
time.sleep(0.1)
def _send_register_rt(self):
"""Fires a subscription packet every 10 seconds"""
@ -143,6 +144,8 @@ class VbanCmd(metaclass=ABCMeta):
self.text_header.framecounter = count.to_bytes(4, "little")
if param:
self.cache[f"{id_}.{param}"] = val
if self.sync:
time.sleep(0.02)
@script
def sendtext(self, cmd):

View File

@ -43,3 +43,6 @@ class Command(IRemote):
self.setter("lock", 1 if val else 0)
lock = property(fset=set_lock)
def reset(self):
self._remote.apply_config("reset")

View File

@ -187,7 +187,7 @@ class VBAN_VMRT_Packet_Data:
def striplabels(self) -> tuple:
"""returns tuple of strip labels"""
return tuple(
self._stripLabelUTF8c60[i : i + 60].decode("ascii").split("\x00")[0]
self._stripLabelUTF8c60[i : i + 60].decode().split("\x00")[0]
for i in range(0, 480, 60)
)
@ -195,7 +195,7 @@ class VBAN_VMRT_Packet_Data:
def buslabels(self) -> tuple:
"""returns tuple of bus labels"""
return tuple(
self._busLabelUTF8c60[i : i + 60].decode("ascii").split("\x00")[0]
self._busLabelUTF8c60[i : i + 60].decode().split("\x00")[0]
for i in range(0, 480, 60)
)