From 079bf177a12b57eccdc6cf0d67589c58893175b7 Mon Sep 17 00:00:00 2001 From: onyx-and-iris <75868496+onyx-and-iris@users.noreply.github.com> Date: Thu, 7 Jul 2022 01:45:06 +0100 Subject: [PATCH] move check ldirty before updating public packet. patch bump --- pyproject.toml | 2 +- vban_cmd/base.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7ba7ddb..96c12d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] license = "MIT" diff --git a/vban_cmd/base.py b/vban_cmd/base.py index 9bb96c4..9a0509e 100644 --- a/vban_cmd/base.py +++ b/vban_cmd/base.py @@ -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)