Skip to content

Commit

Permalink
Merge pull request #164 from Luos-io/rc_2.2.5
Browse files Browse the repository at this point in the history
Pyluos version 2.2.5
  • Loading branch information
JeromeGalan authored Oct 17, 2022
2 parents 4649829 + 156e53a commit ec4fffb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion pyluos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ def _setup(self):
"pyluos_rev": version,
"routing_table":state['routing_table']}
try:
requests.post("https://monorepo-services.vercel.app/api/telemetry",
r = requests.post("https://monorepo-services.vercel.app/api/telemetry",
data=luos_telemetry)
if not r:
print("Telemetry request failed : error " + str(r.status_code))
except:
print("Telemetry request failed.")
else:
Expand Down
10 changes: 8 additions & 2 deletions pyluos/io/serial_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, host, baudrate=None):
self._serial = _serial.Serial(host, baudrate)
self._serial.flush()

self._msg = queue.Queue(100)
self._msg = queue.Queue(500)
self._running = True

self._poll_loop = Thread(target=self._poll)
Expand Down Expand Up @@ -112,7 +112,13 @@ def extract_line(s):
return extract_line(s[H+1:])
else:
# Footer is ok
return s[data_start:data_end], s[data_end + 1:]
data = s[data_start:data_end]
if data == b'{}\n':
# Datas are void
return b'', s[data_end + 1:]
else:
# Datas are not void
return data, s[data_end + 1:]

period = 1 / self.poll_frequency
buff = b''
Expand Down
2 changes: 1 addition & 1 deletion pyluos/io/ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, host, port=9342):
self._ws = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self._ws.connect((host, port))

self._msg = queue.Queue(100)
self._msg = queue.Queue(500)
self._running = True

self._poll_loop = Thread(target=self._poll)
Expand Down
2 changes: 1 addition & 1 deletion pyluos/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.2.4'
version = '2.2.5'

0 comments on commit ec4fffb

Please sign in to comment.