move check ldirty before updating public packet.

patch bump
This commit is contained in:
onyx-and-iris 2022-07-07 01:45:06 +01:00
parent 444d26a869
commit 079bf177a1
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "vban-cmd"
version = "1.1.1"
version = "1.1.2"
description = "Python interface for the VBAN RT Packet Service (Sendtext)"
authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT"

View File

@ -200,14 +200,14 @@ class VbanCmd(metaclass=ABCMeta):
self._strip_buf, self._bus_buf = self._get_levels(self._pp)
self._pdirty = self._pp.pdirty(self.public_packet)
if self.public_packet != self._pp:
self._public_packet = self._pp
if self.pdirty:
self.subject.notify("pdirty")
if self.ldirty:
self.cache["strip_level"] = tuple(self._strip_buf)
self.cache["bus_level"] = tuple(self._bus_buf)
self.subject.notify("ldirty")
if self.public_packet != self._pp:
self._public_packet = self._pp
if self.pdirty:
self.subject.notify("pdirty")
elapsed = time.time() - start
if self.ratelimit - elapsed > 0:
time.sleep(self.ratelimit - elapsed)