mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-18 18:40:47 +00:00
reset() added to command.
minor delay added to login (give time for first incoming packet).
This commit is contained in:
parent
a86a25ca8f
commit
1f522b997e
@ -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):
|
||||
|
@ -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")
|
||||
|
@ -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)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user