modify debug tool
authorkyz <kongyuzhong@google.com>
Wed, 20 Aug 2025 02:28:26 +0000 (10:28 +0800)
committerkyz <kongyuzhong@google.com>
Wed, 20 Aug 2025 02:28:26 +0000 (10:28 +0800)
tools_v2/test.py

index 75b2411ae9be48fb454908bf8d74f64732ce5db7..1f1e325d7e4fd3d6274a20b2381791a1a3fe5362 100644 (file)
@@ -45,8 +45,7 @@ class App( QDialog, ui_welding.Ui_Dialog ):
     def __init__( self ):
         super().__init__()
         self.setupUi(self)
-        self.setWindowTitle( u"焊接控制器调试工具 V1.0")
-
+        self.setWindowTitle( u"焊接控制器调试工具 V1.0" )
         self.trigger_rx_pkt.connect( self.on_rx_pkt )
         self.trigger_ctrl_write.connect( self.on_ctrl_write_signal )
 
@@ -563,10 +562,15 @@ class App( QDialog, ui_welding.Ui_Dialog ):
             if self.ser_open():
                 if self.tx_cmd( 0x0022, struct.pack( '>L', id )):
                     self.connected = id
+                    if id in [1,2]:
+                        self.frame_left.setEnabled(0)
+
         elif self.connected == id:
             self.tx_cmd( 0x0022, struct.pack( '>L', 0 ))
             self.connected = 0
             self.ser_close()
+            if id in [1,2]:
+                self.frame_left.setEnabled(1)
         self.btn_connect_devinfo.setStyleSheet( "background-color: green" if self.connected==1 else "background-color: lightgray" )
         self.btn_connect_curr.setStyleSheet( "background-color: green" if self.connected==2 else "background-color: lightgray" )
         if self.connected: