Skip to content

Commit

Permalink
Pulsoid is actually fixed now (probably)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lioncat6 committed Jan 11, 2024
1 parent 6fe10f2 commit 37ec5a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osc-chat-tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,7 @@ def heartRateListen():
global heartRate
global pulsoidLastUsed
global hypeRateLastUsed
global hrConnected
join_msg = {
"topic": "hr:"+hypeRateSessionId, # replace <ID> with the user session id
"event": "phx_join",
Expand All @@ -2196,7 +2197,7 @@ def heartRateListen():
}
if useHypeRate:
ws.send(json.dumps(join_msg))
while True:
while run:
try:
event = ws.recv()
if usePulsoid:
Expand All @@ -2213,9 +2214,11 @@ def heartRateListen():
client.send_message("/avatar/parameters/isHRActive", True)
client.send_message("/avatar/parameters/isHRConnected", True)
client.send_message("/avatar/parameters/HR", int(heartRate))

except Exception as e:
if not 'Connection timed out' in str(e):
outputLog(str(e))
hrConnected = False
break
pass
time.sleep(.01)
Expand Down

0 comments on commit 37ec5a1

Please sign in to comment.