driver: Fix disconnection bug at high cmd rate

- Disconnection issue can be triggered by setting high polling rate
(500Hz) and then interactive with gui elements
This commit is contained in:
linuswck 2024-10-22 11:59:11 +08:00
parent 8f5a294a53
commit a1b7538295

View File

@ -879,7 +879,7 @@ class Kirdy:
else:
self._report_sig.emit(response)
else:
if self._msg_queue_get_report:
if self._msg_queue_get_report and response["msg_type"] == 'Report':
self._msg_queue_get_report = False
self._int_msg_queue.put_nowait_overwrite(response)
except asyncio.exceptions.CancelledError: