renamed BSMonitorThread.value -> BSMonitorThread.data

This commit is contained in:
2023-02-19 00:03:40 +01:00
parent 8e42467208
commit 932c0e2d59
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ class BSCombined(Sensor):
super()._collect(value)
def get_current_value(self):
data = self.thread.value
data = self.thread.data
return self._order_and_combine(data)
def _order_and_combine(self, data):
+4 -4
View File
@@ -21,7 +21,7 @@ class BSSensor(Sensor):
super()._collect(value)
def get_current_value(self):
data = self.thread.value
data = self.thread.data
return self._unpack(data)
def _unpack(self, data):
@@ -51,7 +51,7 @@ class BSMonitorThread(Thread):
self.callback = callback
self.use_callback = Event()
self.running = Event()
self.value = None
self.data = None
self.source = BSSource(names, **kwargs)
def run(self):
@@ -60,9 +60,9 @@ class BSMonitorThread(Thread):
running.set()
with self.source as src:
while running.is_set():
self.value = value = src.get()
self.data = data = src.get()
if use_callback.is_set():
self.callback(value)
self.callback(data)
running.clear()
def stop(self):