forked from Telos4/RoboRally
fixed problem with slow event server
This commit is contained in:
parent
708284749d
commit
2060d8eb15
|
@ -20,6 +20,9 @@ class MeasurementHandler(socketserver.BaseRequestHandler):
|
|||
while not self.server.estimator.event_queue.empty():
|
||||
event = self.server.estimator.event_queue.get()
|
||||
self.request.sendall((json.dumps(event) + '\n').encode())
|
||||
self.server.estimator.last_event = None
|
||||
time.sleep(1.0 / self.server.max_measurements_per_second)
|
||||
|
||||
else:
|
||||
# send robot position
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user