Skip to content

Commit

Permalink
fix esc status label update after pannel close
Browse files Browse the repository at this point in the history
  • Loading branch information
Huibean committed Nov 11, 2024
1 parent 1f377ff commit 65e4b4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dronecan_gui_tool/panels/esc_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from PyQt5.QtCore import QTimer, Qt
from logging import getLogger
from ..widgets import make_icon_button, get_icon, get_monospace_font
import sip

__all__ = 'PANEL_NAME', 'spawn', 'get_icon'

Expand Down Expand Up @@ -176,7 +177,8 @@ def __init__(self, parent, node):
def _on_esc_status(self, msg):
if msg.message.esc_index < len(self._sliders):
sl = self._sliders[msg.message.esc_index]
sl.update_status(msg)
if sl and not sip.isdeleted(sl):
sl.update_status(msg)

def _do_broadcast(self):
try:
Expand Down

0 comments on commit 65e4b4d

Please sign in to comment.