modify status bar info for getting temp info.
This commit is contained in:
parent
592cd19d02
commit
ebd11fd36f
@ -500,6 +500,7 @@ class SocketClientApp(QMainWindow):
|
|||||||
self.temp2_label.setText(f"温度2:{value.temp2 / 1000} v")
|
self.temp2_label.setText(f"温度2:{value.temp2 / 1000} v")
|
||||||
self.offset1_label.setText(f"偏置电压1:{value.offset1 / 100} v")
|
self.offset1_label.setText(f"偏置电压1:{value.offset1 / 100} v")
|
||||||
self.offset2_label.setText(f"偏置电压2:{value.offset2 / 100} v")
|
self.offset2_label.setText(f"偏置电压2:{value.offset2 / 100} v")
|
||||||
|
self.status_bar.showMessage("状态: 温度数据获取完成", 5000)
|
||||||
elif cmd == 0x0F:
|
elif cmd == 0x0F:
|
||||||
body_format = '< B B'
|
body_format = '< B B'
|
||||||
body_size = struct.calcsize(body_format)
|
body_size = struct.calcsize(body_format)
|
||||||
@ -689,8 +690,18 @@ class SocketClientApp(QMainWindow):
|
|||||||
print(f"Packet {i + 1} sent successfully")
|
print(f"Packet {i + 1} sent successfully")
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
print("Upgrade packet ready to send (commented out actual send code)")
|
print("Upgrade packet ready to send (commented out actual send code)")
|
||||||
|
QMessageBox.information(
|
||||||
|
self,
|
||||||
|
"升级",
|
||||||
|
"升级包已成功上传"
|
||||||
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Upgrade failed: {str(e)}")
|
print(f"Upgrade failed: {str(e)}")
|
||||||
|
QMessageBox.critical(
|
||||||
|
self,
|
||||||
|
"升级",
|
||||||
|
"升级包上传失败"
|
||||||
|
)
|
||||||
|
|
||||||
def on_button_upgrade_test(self):
|
def on_button_upgrade_test(self):
|
||||||
"""打开文件选择对话框"""
|
"""打开文件选择对话框"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user