From: kyz Date: Wed, 20 Aug 2025 02:28:26 +0000 (+0800) Subject: modify debug tool X-Git-Url: http://kyz.pub/gitweb/?a=commitdiff_plain;h=645d9ab696c743eda6aace7c52365add99fe0097;p=yn%2Fweldingcontroller.git modify debug tool --- diff --git a/tools_v2/test.py b/tools_v2/test.py index 75b2411..1f1e325 100644 --- a/tools_v2/test.py +++ b/tools_v2/test.py @@ -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: