dronecan / gui_tool

MIT License
27 stars 30 forks source link

fix esc status label update after pannel close #72

Open Huibean opened 2 weeks ago

Huibean commented 2 weeks ago

avoid update function call after pannel close

2024-11-11 14:48:17,410 ERROR dronecan.node Transfer handler exception
Traceback (most recent call last):
  File "/home/parallels/.local/lib/python3.12/site-packages/dronecan/node.py", line 198, in call_handlers
    wrapper(transfer)
  File "/home/parallels/.local/lib/python3.12/site-packages/dronecan/node.py", line 171, in call
    result = handler(event, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/dronecan_gui_tool/panels/esc_panel.py", line 179, in _on_esc_status
    sl.update_status(msg)
  File "/usr/local/lib/python3.12/dist-packages/dronecan_gui_tool/panels/esc_panel.py", line 87, in update_status
    self._error_count_label.setText(f'Err: {status.error_count}')
RuntimeError: wrapped C/C++ object of type QLabel has been deleted