revert temp

This commit is contained in:
NATURESPEAK
2022-04-04 10:48:02 +02:00
parent b2cc817911
commit 35caa1e0ad
2 changed files with 17 additions and 11 deletions
+8 -3
View File
@@ -3,6 +3,8 @@ from osc4py3 import oscbuildparse
from threading import Lock
mutex = Lock()
temp_mutex = Lock()
def start_osc():
osc_startup()
@@ -38,9 +40,12 @@ class OscBroadcaster:
update()
def temperature(self, temp: float, channel: str):
msg = oscbuildparse.OSCMessage(channel, None, [temp])
osc_send(msg, self.name)
update()
global temp_mutex
with temp_mutex:
msg = oscbuildparse.OSCMessage(channel, None, [temp])
osc_send(msg, self.name)
osc_process()
class OscReceiver: