diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/.gitignore b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/.gitignore
new file mode 100644
index 0000000..1c2fda5
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/gui.iml b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/gui.iml
new file mode 100644
index 0000000..f07d4ba
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/gui.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/inspectionProfiles/profiles_settings.xml b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/misc.xml b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/misc.xml
new file mode 100644
index 0000000..60ccf71
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/modules.xml b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/modules.xml
new file mode 100644
index 0000000..dd331b8
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/other.xml b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/other.xml
new file mode 100644
index 0000000..08305b9
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/other.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/vcs.xml b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/vcs.xml
new file mode 100644
index 0000000..9661ac7
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/.idea/workspace.xml b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/workspace.xml
new file mode 100644
index 0000000..f39111f
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/.idea/workspace.xml
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ C:\Users\Administrator\AppData\Roaming\Subversion
+
+
+
+
+ 1666014368602
+
+
+ 1666014368602
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1666317348784
+
+
+
+ 1666317348784
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/main.py b/esp32_buck_boost/GUI/udpmonitor/gui/main.py
new file mode 100644
index 0000000..c39fadf
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/main.py
@@ -0,0 +1,373 @@
+import sys
+from PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QMainWindow, QMessageBox
+from PyQt5.QtGui import QTextCursor, QIcon
+from main_ui import *
+from wifi_udp import *
+import threading # 引入并行
+import numpy as np
+import pyqtgraph as pg
+import re
+import time
+from sharedcomponets import GUIToolKit
+import socket
+import webbrowser
+
+import copy
+
+
+class MyWindow(QMainWindow, Ui_MainWindow):
+ signalColors = [GUIToolKit.RED_COLOR, GUIToolKit.BLUE_COLOR, GUIToolKit.PURPLE_COLOR, GUIToolKit.YELLOW_COLOR,
+ GUIToolKit.MAROON_COLOR, GUIToolKit.ORANGE_COLOR, GUIToolKit.GREEN_COLOR, GUIToolKit.GREEN_COLOR,
+ GUIToolKit.GREEN_COLOR, GUIToolKit.GREEN_COLOR, GUIToolKit.GREEN_COLOR]
+ signalIcons = ['reddot', 'bluedot', 'purpledot', 'yellowdot', 'maroondot', 'orangedot', 'greendot', 'greendot',
+ 'greendot', 'greendot', 'greendot']
+ textColors = ['FD42AC', '398AD9', 'FF33FF', 'FFFF00', 'AA0000', 'FF5C5C', '5BEC8D', '5BEC8D', '5BEC8D', '5BEC8D',
+ '5BEC8D', '5BEC8D']
+
+ def __init__(self, parent=None):
+ super(MyWindow, self).__init__(parent)
+ self.title = "ESP32 MPPT Monitor"
+ self.version = "Ver: 0.1.2"
+
+ self.wid = QWidget(self)
+ self.setCentralWidget(self.wid)
+
+ self.setupUi(self)
+ self.setWindowTitle(self.title)
+
+ self.pLabel1 = QtWidgets.QLabel()
+ self.pLabel1.setMinimumWidth(65)
+ self.statusbar.addWidget(self.pLabel1)
+ self.pLabel1.setText(self.version)
+
+ self.pLabel2 = QtWidgets.QLabel()
+ self.pLabel2.setMinimumWidth(125)
+ self.statusbar.addWidget(self.pLabel2)
+
+ self.timerLocaltime = QtCore.QTimer()
+ self.timerLocaltime.timeout.connect(self.updateUiTime)
+ self.timerLocaltime.start(500)
+
+ # 变量初始化
+ self.wifi_open_flag = 0
+ self.test_flag = 0
+ self.wifi_IP_lineEdit.setText(self.get_host_ip())
+ # self.variable_init()
+ # 设置实例
+ # self.CreateItems()
+ # 设置信号与槽
+ self.CreateSignalSlot()
+
+ def updateUiTime(self):
+ self.pLabel2.setText(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
+
+ def get_host_ip(self):
+ """
+ 查询本机ip地址
+ :return:
+ """
+ st = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ try:
+ st.connect(('10.255.255.255', 1))
+ IP = st.getsockname()[0]
+ except Exception:
+ IP = '127.0.0.1'
+ finally:
+ st.close()
+ return IP
+
+ # 设置信号与槽
+ def CreateSignalSlot(self):
+
+ self.wifi_config_pushButton.clicked.connect(self.wifi_config_pushButton_clicked)
+ self.wifi_command_pushButton_1.clicked.connect(self.wifi_command_pushButton_1_clicked)
+
+ self.SERIAL_pushButton.clicked.connect(self.SERIAL_pushButton_clicked)
+ self.FWUPDATE_pushButton.clicked.connect(self.FWUPDATE_pushButton_clicked)
+ self.ESPRESTART_pushButton.clicked.connect(self.ESPRESTART_pushButton_clicked)
+
+ self.raw_pushButton.clicked.connect(self.raw_pushButton_clicked)
+ self.wave_pushButton.clicked.connect(self.wave_pushButton_clicked)
+
+ def raw_pushButton_clicked(self):
+ self.change_state = 1
+ self.stackedWidget.setCurrentIndex(1)
+
+ def wave_pushButton_clicked(self):
+ self.change_state = 0
+ self.stackedWidget.setCurrentIndex(0)
+
+ # 设置实例
+ def CreateItems(self):
+ # 定时器-绘图刷新
+ self.timer = QtCore.QTimer()
+ self.timer.timeout.connect(self.update_plot)
+ self.timer.start(20)
+ # wifi udp
+ self.udp = udp(self.wifi_IP_lineEdit_3.text())
+ # self.wifi_IP_lineEdit.setText(self.udp.user_ip)#设置为当前本机ID
+
+ def variable_init(self):
+ # wifi变量
+ self.wifi_recv_flag = 0
+ self.close_flag = 1
+ self.change_state = 0
+ self.re_item = []
+ self.re_item2 = []
+ self.raw_roll = 0
+
+ def plot_init(self):
+ # 绘图对象
+ pg.setConfigOptions(antialias=True)
+ self.plotWidget = pg.PlotWidget()
+ self.plotWidget.showGrid(x=True, y=True, alpha=0.5)
+ self.plotWidget.addLegend()
+ self.controlPlotWidget = ControlPlotPanel(controllerPlotWidget=self)
+ # 图表可视化数组
+ self.numberOfSamples = int(self.SAMPLE_doubleSpinBox.text())
+ self.signalDataArrays = []
+ self.signalPlots = []
+ self.signalPlotFlags = []
+ self.timeArray = np.arange(-self.numberOfSamples, 0, 1)
+ for (sig, sigColor, checkBox, tooltip) in zip(self.re_item, self.signalColors,
+ self.controlPlotWidget.signalCheckBox, self.re_item):
+ # define signal plot data array
+ self.signalDataArrays.append(np.zeros(self.numberOfSamples))
+ # configure signal plot parameters
+ signalPen = pg.mkPen(color=sigColor, width=1.5)
+ self.signalPlots.append(pg.PlotDataItem(self.timeArray, self.signalDataArrays[-1],
+ pen=signalPen, name=tooltip))
+ self.plotWidget.addItem(self.signalPlots[-1])
+ # is plotted flag
+ self.signalPlotFlags.append(True)
+ # add callback
+ checkBox.stateChanged.connect(self.signalPlotFlagUpdate)
+ self.stackedWidget = QtWidgets.QStackedWidget()
+ self.gridLayout.addWidget(self.stackedWidget)
+ self.raw_line = QtWidgets.QTextEdit()
+ self.raw_line.setStyleSheet('background: rgb(0, 0, 0)')
+ self.stackedWidget.addWidget(self.plotWidget)
+ self.stackedWidget.addWidget(self.raw_line)
+ self.tool_layout.addWidget(self.controlPlotWidget)
+
+ # checkbox
+ def signalPlotFlagUpdate(self):
+ for i, (checkBox, plotFlag) in enumerate(zip(self.controlPlotWidget.signalCheckBox, self.signalPlotFlags)):
+ if checkBox.isChecked() and (not plotFlag):
+ self.signalPlotFlags[i] = True
+ self.plotWidget.addItem(self.signalPlots[i])
+ elif (not checkBox.isChecked()) and plotFlag:
+ self.signalPlotFlags[i] = False
+ self.plotWidget.removeItem(self.signalPlots[i])
+
+ # 滑条绑定
+ def horizontalSlider_valueChanged(self, slider):
+ i = self.slider_lab.index(slider.objectName())
+ layout = getattr(self, 'horizontalLayout_{}'.format(i + 4))
+ value = layout.itemAt(1).widget().value()
+ value = float(layout.itemAt(0).widget().text()) + (value + 100) * (
+ float(layout.itemAt(2).widget().text()) - float(layout.itemAt(0).widget().text())) / 200
+ layout.itemAt(6).widget().setText(str(value))
+ value = layout.itemAt(4).widget().text() + str(value)
+ self.udp.send_message(str(value))
+
+ # command命令发送事件
+ def wifi_command_pushButton_1_clicked(self):
+ self.udp.send_message(self.wifi_command_lineEdit_1.text())
+
+ def SERIAL_pushButton_clicked(self):
+ self.udp.send_message("SERIAL")
+
+ def GETESPINFO_pushButton_clicked(self):
+ self.udp.send_message("ESPINFO")
+
+ def FWUPDATE_pushButton_clicked(self):
+ self.udp.send_message("FWUPDATE")
+ url = "http://"+self.wifi_IP_lineEdit_3.text()
+ webbrowser.open_new_tab(url)
+
+ def ESPRESTART_pushButton_clicked(self):
+ self.udp.send_message("ESPRESTART")
+
+ def INVD_pushButton_clicked(self):
+ self.udp.send_message("INVD" + self.INVD_doubleSpinBox.text())
+
+ # WIFI设置点击后判断有无接收到esp32发来的数据
+ def wifi_config_pushButton_clicked(self):
+ if self.wifi_open_flag == 0:
+ try:
+ self.variable_init()
+ self.CreateItems()
+ print(self.wifi_IP_lineEdit.text())
+ self.udp.udpClientSocket.bind((self.wifi_IP_lineEdit.text(), 2333))
+ self.udp.udpClientSocket.settimeout(1)
+ # 第一次接受数据,用于判断项目数,
+ self.udp.send_message("START1")
+ recv_data = self.udp.udpClientSocket.recv(1024)
+ recv_data = recv_data.decode('utf-8')
+ recv_data = recv_data[:-1]
+ recv_data = recv_data.split(',')
+ """处理接受的信息"""
+ for i, data in enumerate(recv_data):
+ if i< 5:
+ self.re_item2.append(''.join(re.split(r'[^A-Za-z]', data)))
+ if(i==0):
+ self.RNFA_doubleSpinBox.setProperty("value", data.replace(self.re_item2[i], ''))
+ elif(i==1):
+ self.RNFB_doubleSpinBox.setProperty("value", data.replace(self.re_item2[i], ''))
+ elif(i==2):
+ self.pwm_label.setText(data.replace(self.re_item2[i], ''))
+ elif(i==3):
+ self.ppwm_label.setText(data.replace(self.re_item2[i], ''))
+ elif(i==4):
+ self.pwmc_label.setText(data.replace(self.re_item2[i], ''))
+ else:
+ self.re_item.append(''.join(re.split(r'[^A-Za-z]', data)))
+ if(i==6):
+ print(data.replace(self.re_item[i-5], ''))
+ self.INVD_doubleSpinBox.setProperty("value", data.replace(self.re_item[i-5], ''))
+ elif(i==9):
+ print(data.replace(self.re_item[i-5], ''))
+ self.OUTVD_doubleSpinBox.setProperty("value", data.replace(self.re_item[i-5], ''))
+
+ print(self.re_item)
+ print(self.re_item2)
+ # 图表初始化
+ self.plot_init()
+ t1 = threading.Thread(target=self.udp_recv)
+ # t1.setDaemon(True)
+ t1.start()
+ self.wifi_open_flag = 1
+ self.wifi_config_pushButton.setText("断开连接")
+ self.wifi_config_pushButton.setStyleSheet("QPushButton{color:rgb(255,0,0,255);}")
+ except Exception as e:
+ print(e)
+ QMessageBox.critical(self, "错误", str(e))
+ else:
+ self.close_flag = 0
+ self.wifi_open_flag = 0
+ self.tool_layout.itemAt(0).widget().deleteLater()
+ self.gridLayout.itemAt(0).widget().deleteLater()
+ self.wifi_config_pushButton.setText("设置")
+ print("断开连接")
+ print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
+
+ def udp_recv(self):
+ while self.close_flag:
+ try:
+ recv_data = self.udp.udpClientSocket.recv(1024)
+ recv_data = recv_data.decode('utf-8')
+ recv_data = recv_data[:-1]
+ recv_data = recv_data.split(',')
+ """处理接受的信息"""
+ # print(recv_data)
+ self.re_text = ''
+ for i, data in enumerate(recv_data):
+ if i < 5:
+ if (i == 2):
+ self.pwm_label.setText(data.replace(self.re_item2[i], ''))
+ elif (i == 3):
+ self.ppwm_label.setText(data.replace(self.re_item2[i], ''))
+ elif (i == 4):
+ self.pwmc_label.setText(data.replace(self.re_item2[i], ''))
+ else:
+ if self.signalPlotFlags[i-5]:
+ # self.re_item.append(''.join(re.split(r'[^A-Za-z]', data)))
+ data = data.replace(self.re_item[i-5], '')
+ if self.change_state:
+ self.re_text += '{0}\t'.format(data, self.textColors[i-5])
+ else:
+ self.signalDataArrays[i-5] = np.roll(self.signalDataArrays[i-5], -1)
+ self.signalDataArrays[i-5][-1] = data
+ del recv_data
+ except socket.timeout:
+ print("closing socket")
+ print(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))
+ self.wifi_config_pushButton_clicked()
+ self.closeUDP()
+
+ def update_plot(self):
+ if self.wifi_recv_flag:
+ if self.change_state:
+ self.raw_line.append(self.re_text)
+ if self.raw_roll:
+ self.raw_line.moveCursor(QTextCursor.End)
+ else:
+ for i, plotFlag in enumerate(self.signalPlotFlags):
+ if plotFlag:
+ self.signalPlots[i].setData(self.timeArray, self.signalDataArrays[i])
+ self.signalPlots[i].updateItems()
+ self.signalPlots[i].sigPlotChanged.emit(self.signalPlots[i])
+
+ def closeUDP(self):
+ self.variable_init()
+ self.close_flag = 0
+ self.udp.send_message("START0")
+ self.udp.udpClientSocket.close()
+ del self.udp
+
+ def closeEvent(self, a0: QtGui.QCloseEvent) -> None:
+ print("关闭")
+ self.close_flag = 0
+
+
+class ControlPlotPanel(QtWidgets.QWidget):
+
+ def __init__(self, parent=None, controllerPlotWidget=None):
+ '''Constructor for ToolsWidget'''
+ super().__init__(parent)
+ # 变量
+
+ # 继承主窗口对象
+ self.controlledPlot = controllerPlotWidget
+
+ self.horizontalLayout1 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout1.setObjectName('horizontalLayout')
+ self.setLayout(self.horizontalLayout1)
+
+ self.startStopButton = QtWidgets.QPushButton(self)
+ self.startStopButton.setObjectName('Start')
+ self.startStopButton.setText('Start')
+ self.startStopButton.setIcon(GUIToolKit.getIconByName('start'))
+ self.startStopButton.clicked.connect(self.wifi_recv_open_pushButton_clicked)
+ self.horizontalLayout1.addWidget(self.startStopButton)
+
+ self.zoomAllButton = QtWidgets.QPushButton(self)
+ self.zoomAllButton.setObjectName('zoomAllButton')
+ self.zoomAllButton.setText('View all')
+ self.zoomAllButton.setIcon(GUIToolKit.getIconByName('zoomall'))
+ self.zoomAllButton.clicked.connect(self.zoomAllPlot)
+ self.horizontalLayout1.addWidget(self.zoomAllButton)
+
+ self.signalCheckBox = []
+ for i in range(len(self.controlledPlot.re_item)):
+ checkBox = QtWidgets.QCheckBox(self)
+ checkBox.setObjectName('signalCheckBox' + str(i))
+ checkBox.setToolTip(self.controlledPlot.re_item[i])
+ checkBox.setText(self.controlledPlot.re_item[i])
+ checkBox.setIcon(GUIToolKit.getIconByName(self.controlledPlot.signalIcons[i]))
+ checkBox.setChecked(True)
+ self.signalCheckBox.append(checkBox)
+ self.horizontalLayout1.addWidget(checkBox)
+
+ def zoomAllPlot(self):
+ if self.controlledPlot.change_state:
+ self.controlledPlot.raw_roll = ~self.controlledPlot.raw_roll
+ else:
+ self.controlledPlot.plotWidget.enableAutoRange()
+
+ def wifi_recv_open_pushButton_clicked(self):
+ if self.controlledPlot.wifi_recv_flag == 0:
+ # 打开wifi接收
+ self.controlledPlot.wifi_recv_flag = 1
+ self.startStopButton.setText('Stop')
+ else:
+ self.controlledPlot.wifi_recv_flag = 0
+ self.startStopButton.setText('Start')
+
+if __name__ == '__main__':
+ QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
+ app = QApplication(sys.argv)
+ myWin = MyWindow()
+ myWin.show()
+ sys.exit(app.exec())
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/main.spec b/esp32_buck_boost/GUI/udpmonitor/gui/main.spec
new file mode 100644
index 0000000..594e298
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/main.spec
@@ -0,0 +1,44 @@
+# -*- mode: python ; coding: utf-8 -*-
+
+
+block_cipher = None
+
+
+a = Analysis(
+ ['main.py'],
+ pathex=[],
+ binaries=[],
+ datas=[],
+ hiddenimports=[],
+ hookspath=[],
+ hooksconfig={},
+ runtime_hooks=[],
+ excludes=[],
+ win_no_prefer_redirects=False,
+ win_private_assemblies=False,
+ cipher=block_cipher,
+ noarchive=False,
+)
+pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
+
+exe = EXE(
+ pyz,
+ a.scripts,
+ a.binaries,
+ a.zipfiles,
+ a.datas,
+ [],
+ name='main',
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=True,
+ upx_exclude=[],
+ runtime_tmpdir=None,
+ console=False,
+ disable_windowed_traceback=False,
+ argv_emulation=False,
+ target_arch=None,
+ codesign_identity=None,
+ entitlements_file=None,
+)
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/main_ui.py b/esp32_buck_boost/GUI/udpmonitor/gui/main_ui.py
new file mode 100644
index 0000000..2033992
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/main_ui.py
@@ -0,0 +1,321 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'main_ui.ui'
+#
+# Created by: PyQt5 UI code generator 5.15.4
+#
+# WARNING: Any manual changes made to this file will be lost when pyuic5 is
+# run again. Do not edit this file unless you know what you are doing.
+
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+
+class Ui_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(1095, 681)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.formLayout = QtWidgets.QFormLayout(self.centralwidget)
+ self.formLayout.setObjectName("formLayout")
+ self.groupBox_3 = QtWidgets.QGroupBox(self.centralwidget)
+ self.groupBox_3.setObjectName("groupBox_3")
+ self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_3)
+ self.gridLayout_2.setObjectName("gridLayout_2")
+ self.horizontalLayout_1 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_1.setObjectName("horizontalLayout_1")
+ self.label_10 = QtWidgets.QLabel(self.groupBox_3)
+ self.label_10.setObjectName("label_10")
+ self.horizontalLayout_1.addWidget(self.label_10)
+ self.wifi_command_lineEdit_1 = QtWidgets.QLineEdit(self.groupBox_3)
+ self.wifi_command_lineEdit_1.setObjectName("wifi_command_lineEdit_1")
+ self.horizontalLayout_1.addWidget(self.wifi_command_lineEdit_1)
+ self.wifi_command_pushButton_1 = QtWidgets.QPushButton(self.groupBox_3)
+ self.wifi_command_pushButton_1.setObjectName("wifi_command_pushButton_1")
+ self.horizontalLayout_1.addWidget(self.wifi_command_pushButton_1)
+ self.gridLayout_2.addLayout(self.horizontalLayout_1, 0, 0, 1, 1)
+ self.groupBox_5 = QtWidgets.QGroupBox(self.groupBox_3)
+ self.groupBox_5.setObjectName("groupBox_5")
+ self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox_5)
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ self.groupBox_8 = QtWidgets.QGroupBox(self.groupBox_5)
+ self.groupBox_8.setObjectName("groupBox_8")
+ self.gridLayout_10 = QtWidgets.QGridLayout(self.groupBox_8)
+ self.gridLayout_10.setObjectName("gridLayout_10")
+ self.label_6 = QtWidgets.QLabel(self.groupBox_8)
+ self.label_6.setObjectName("label_6")
+ self.gridLayout_10.addWidget(self.label_6, 0, 0, 1, 1)
+ self.label_9 = QtWidgets.QLabel(self.groupBox_8)
+ self.label_9.setObjectName("label_9")
+ self.gridLayout_10.addWidget(self.label_9, 0, 1, 1, 1)
+ self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_6.setObjectName("horizontalLayout_6")
+ self.label = QtWidgets.QLabel(self.groupBox_8)
+ self.label.setObjectName("label")
+ self.horizontalLayout_6.addWidget(self.label)
+ self.label_3 = QtWidgets.QLabel(self.groupBox_8)
+ self.label_3.setObjectName("label_3")
+ self.horizontalLayout_6.addWidget(self.label_3)
+ self.gridLayout_10.addLayout(self.horizontalLayout_6, 0, 2, 1, 1)
+ self.horizontalLayout_7 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_7.setObjectName("horizontalLayout_7")
+ self.label_7 = QtWidgets.QLabel(self.groupBox_8)
+ self.label_7.setObjectName("label_7")
+ self.horizontalLayout_7.addWidget(self.label_7)
+ self.label_8 = QtWidgets.QLabel(self.groupBox_8)
+ self.label_8.setObjectName("label_8")
+ self.horizontalLayout_7.addWidget(self.label_8)
+ self.gridLayout_10.addLayout(self.horizontalLayout_7, 0, 3, 1, 1)
+ self.verticalLayout_2.addWidget(self.groupBox_8)
+ self.groupBox_7 = QtWidgets.QGroupBox(self.groupBox_5)
+ self.groupBox_7.setObjectName("groupBox_7")
+ self.gridLayout_9 = QtWidgets.QGridLayout(self.groupBox_7)
+ self.gridLayout_9.setObjectName("gridLayout_9")
+ self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.label_5 = QtWidgets.QLabel(self.groupBox_7)
+ self.label_5.setObjectName("label_5")
+ self.horizontalLayout_2.addWidget(self.label_5)
+ self.pwmc_label = QtWidgets.QLabel(self.groupBox_7)
+ self.pwmc_label.setObjectName("pwmc_label")
+ self.horizontalLayout_2.addWidget(self.pwmc_label)
+ self.gridLayout_9.addLayout(self.horizontalLayout_2, 0, 0, 1, 1)
+ self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_4.setObjectName("horizontalLayout_4")
+ self.label_2 = QtWidgets.QLabel(self.groupBox_7)
+ self.label_2.setObjectName("label_2")
+ self.horizontalLayout_4.addWidget(self.label_2)
+ self.pwm_label = QtWidgets.QLabel(self.groupBox_7)
+ self.pwm_label.setObjectName("pwm_label")
+ self.horizontalLayout_4.addWidget(self.pwm_label)
+ self.gridLayout_9.addLayout(self.horizontalLayout_4, 0, 1, 1, 1)
+ self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_3.setObjectName("horizontalLayout_3")
+ self.label_4 = QtWidgets.QLabel(self.groupBox_7)
+ self.label_4.setObjectName("label_4")
+ self.horizontalLayout_3.addWidget(self.label_4)
+ self.ppwm_label = QtWidgets.QLabel(self.groupBox_7)
+ self.ppwm_label.setObjectName("ppwm_label")
+ self.horizontalLayout_3.addWidget(self.ppwm_label)
+ self.gridLayout_9.addLayout(self.horizontalLayout_3, 0, 2, 1, 1)
+ self.verticalLayout_2.addWidget(self.groupBox_7)
+ self.gridLayout_2.addWidget(self.groupBox_5, 1, 0, 1, 1)
+ self.groupBox_6 = QtWidgets.QGroupBox(self.groupBox_3)
+ self.groupBox_6.setObjectName("groupBox_6")
+ self.gridLayout_7 = QtWidgets.QGridLayout(self.groupBox_6)
+ self.gridLayout_7.setObjectName("gridLayout_7")
+ self.horizontalLayout_10 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_10.setSpacing(1)
+ self.horizontalLayout_10.setObjectName("horizontalLayout_10")
+ self.label_11 = QtWidgets.QLabel(self.groupBox_6)
+ self.label_11.setObjectName("label_11")
+ self.horizontalLayout_10.addWidget(self.label_11)
+ self.wifi_IP_lineEdit_3 = QtWidgets.QLineEdit(self.groupBox_6)
+ self.wifi_IP_lineEdit_3.setObjectName("wifi_IP_lineEdit_3")
+ self.horizontalLayout_10.addWidget(self.wifi_IP_lineEdit_3)
+ self.gridLayout_7.addLayout(self.horizontalLayout_10, 1, 0, 1, 1)
+ self.horizontalLayout = QtWidgets.QHBoxLayout()
+ self.horizontalLayout.setSpacing(1)
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.label_12 = QtWidgets.QLabel(self.groupBox_6)
+ self.label_12.setObjectName("label_12")
+ self.horizontalLayout.addWidget(self.label_12)
+ self.wifi_IP_lineEdit = QtWidgets.QLineEdit(self.groupBox_6)
+ self.wifi_IP_lineEdit.setText("")
+ self.wifi_IP_lineEdit.setObjectName("wifi_IP_lineEdit")
+ self.horizontalLayout.addWidget(self.wifi_IP_lineEdit)
+ self.wifi_config_pushButton = QtWidgets.QPushButton(self.groupBox_6)
+ self.wifi_config_pushButton.setObjectName("wifi_config_pushButton")
+ self.horizontalLayout.addWidget(self.wifi_config_pushButton)
+ self.gridLayout_7.addLayout(self.horizontalLayout, 2, 0, 1, 1)
+ self.horizontalLayout_21 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_21.setObjectName("horizontalLayout_21")
+ self.label_20 = QtWidgets.QLabel(self.groupBox_6)
+ self.label_20.setObjectName("label_20")
+ self.horizontalLayout_21.addWidget(self.label_20)
+ self.SAMPLE_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_6)
+ self.SAMPLE_doubleSpinBox.setDecimals(0)
+ self.SAMPLE_doubleSpinBox.setMinimum(300.0)
+ self.SAMPLE_doubleSpinBox.setMaximum(10000.0)
+ self.SAMPLE_doubleSpinBox.setSingleStep(100.0)
+ self.SAMPLE_doubleSpinBox.setStepType(QtWidgets.QAbstractSpinBox.AdaptiveDecimalStepType)
+ self.SAMPLE_doubleSpinBox.setProperty("value", 300.0)
+ self.SAMPLE_doubleSpinBox.setObjectName("SAMPLE_doubleSpinBox")
+ self.horizontalLayout_21.addWidget(self.SAMPLE_doubleSpinBox)
+ self.gridLayout_7.addLayout(self.horizontalLayout_21, 0, 0, 1, 1)
+ self.gridLayout_2.addWidget(self.groupBox_6, 5, 0, 1, 1)
+ self.groupBox_4 = QtWidgets.QGroupBox(self.groupBox_3)
+ self.groupBox_4.setObjectName("groupBox_4")
+ self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_4)
+ self.gridLayout_5.setObjectName("gridLayout_5")
+ self.horizontalLayout_20 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_20.setObjectName("horizontalLayout_20")
+ self.label_19 = QtWidgets.QLabel(self.groupBox_4)
+ self.label_19.setObjectName("label_19")
+ self.horizontalLayout_20.addWidget(self.label_19)
+ self.INCD_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_4)
+ self.INCD_doubleSpinBox.setSingleStep(0.5)
+ self.INCD_doubleSpinBox.setProperty("value", 10.0)
+ self.INCD_doubleSpinBox.setObjectName("INCD_doubleSpinBox")
+ self.horizontalLayout_20.addWidget(self.INCD_doubleSpinBox)
+ self.INCD_pushButton = QtWidgets.QPushButton(self.groupBox_4)
+ self.INCD_pushButton.setObjectName("INCD_pushButton")
+ self.horizontalLayout_20.addWidget(self.INCD_pushButton)
+ self.gridLayout_5.addLayout(self.horizontalLayout_20, 4, 0, 1, 1)
+ self.horizontalLayout_18 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_18.setObjectName("horizontalLayout_18")
+ self.label_17 = QtWidgets.QLabel(self.groupBox_4)
+ self.label_17.setObjectName("label_17")
+ self.horizontalLayout_18.addWidget(self.label_17)
+ self.RNFA_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_4)
+ self.RNFA_doubleSpinBox.setDecimals(4)
+ self.RNFA_doubleSpinBox.setMaximum(1.0)
+ self.RNFA_doubleSpinBox.setSingleStep(0.001)
+ self.RNFA_doubleSpinBox.setProperty("value", 0.002)
+ self.RNFA_doubleSpinBox.setObjectName("RNFA_doubleSpinBox")
+ self.horizontalLayout_18.addWidget(self.RNFA_doubleSpinBox)
+ self.RNFA_pushButton = QtWidgets.QPushButton(self.groupBox_4)
+ self.RNFA_pushButton.setObjectName("RNFA_pushButton")
+ self.horizontalLayout_18.addWidget(self.RNFA_pushButton)
+ self.gridLayout_5.addLayout(self.horizontalLayout_18, 2, 0, 1, 1)
+ self.horizontalLayout_17 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_17.setObjectName("horizontalLayout_17")
+ self.label_16 = QtWidgets.QLabel(self.groupBox_4)
+ self.label_16.setObjectName("label_16")
+ self.horizontalLayout_17.addWidget(self.label_16)
+ self.INVD_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_4)
+ self.INVD_doubleSpinBox.setDecimals(3)
+ self.INVD_doubleSpinBox.setMaximum(120.0)
+ self.INVD_doubleSpinBox.setSingleStep(0.5)
+ self.INVD_doubleSpinBox.setProperty("value", 50.0)
+ self.INVD_doubleSpinBox.setObjectName("INVD_doubleSpinBox")
+ self.horizontalLayout_17.addWidget(self.INVD_doubleSpinBox)
+ self.INVD_pushButton = QtWidgets.QPushButton(self.groupBox_4)
+ self.INVD_pushButton.setObjectName("INVD_pushButton")
+ self.horizontalLayout_17.addWidget(self.INVD_pushButton)
+ self.gridLayout_5.addLayout(self.horizontalLayout_17, 0, 0, 1, 1)
+ self.horizontalLayout_19 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_19.setObjectName("horizontalLayout_19")
+ self.label_18 = QtWidgets.QLabel(self.groupBox_4)
+ self.label_18.setObjectName("label_18")
+ self.horizontalLayout_19.addWidget(self.label_18)
+ self.RNFB_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_4)
+ self.RNFB_doubleSpinBox.setDecimals(4)
+ self.RNFB_doubleSpinBox.setMaximum(1.0)
+ self.RNFB_doubleSpinBox.setSingleStep(0.001)
+ self.RNFB_doubleSpinBox.setProperty("value", 0.002)
+ self.RNFB_doubleSpinBox.setObjectName("RNFB_doubleSpinBox")
+ self.horizontalLayout_19.addWidget(self.RNFB_doubleSpinBox)
+ self.RNFB_pushButton = QtWidgets.QPushButton(self.groupBox_4)
+ self.RNFB_pushButton.setObjectName("RNFB_pushButton")
+ self.horizontalLayout_19.addWidget(self.RNFB_pushButton)
+ self.gridLayout_5.addLayout(self.horizontalLayout_19, 3, 0, 1, 1)
+ self.horizontalLayout_16 = QtWidgets.QHBoxLayout()
+ self.horizontalLayout_16.setObjectName("horizontalLayout_16")
+ self.label_15 = QtWidgets.QLabel(self.groupBox_4)
+ self.label_15.setObjectName("label_15")
+ self.horizontalLayout_16.addWidget(self.label_15)
+ self.OUTVD_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox_4)
+ self.OUTVD_doubleSpinBox.setDecimals(3)
+ self.OUTVD_doubleSpinBox.setSingleStep(0.1)
+ self.OUTVD_doubleSpinBox.setProperty("value", 50.0)
+ self.OUTVD_doubleSpinBox.setObjectName("OUTVD_doubleSpinBox")
+ self.horizontalLayout_16.addWidget(self.OUTVD_doubleSpinBox)
+ self.OUTVD_pushButton = QtWidgets.QPushButton(self.groupBox_4)
+ self.OUTVD_pushButton.setObjectName("OUTVD_pushButton")
+ self.horizontalLayout_16.addWidget(self.OUTVD_pushButton)
+ self.gridLayout_5.addLayout(self.horizontalLayout_16, 1, 0, 1, 1)
+ self.gridLayout_2.addWidget(self.groupBox_4, 3, 0, 1, 1)
+ self.groupBox_9 = QtWidgets.QGroupBox(self.groupBox_3)
+ self.groupBox_9.setObjectName("groupBox_9")
+ self.gridLayout_11 = QtWidgets.QGridLayout(self.groupBox_9)
+ self.gridLayout_11.setObjectName("gridLayout_11")
+ self.SERIAL_pushButton = QtWidgets.QPushButton(self.groupBox_9)
+ self.SERIAL_pushButton.setObjectName("SERIAL_pushButton")
+ self.gridLayout_11.addWidget(self.SERIAL_pushButton, 1, 2, 1, 1)
+ self.ESPRESTART_pushButton = QtWidgets.QPushButton(self.groupBox_9)
+ self.ESPRESTART_pushButton.setObjectName("ESPRESTART_pushButton")
+ self.gridLayout_11.addWidget(self.ESPRESTART_pushButton, 2, 2, 1, 1)
+ self.FWUPDATE_pushButton = QtWidgets.QPushButton(self.groupBox_9)
+ self.FWUPDATE_pushButton.setObjectName("FWUPDATE_pushButton")
+ self.gridLayout_11.addWidget(self.FWUPDATE_pushButton, 3, 2, 1, 1)
+ self.gridLayout_2.addWidget(self.groupBox_9, 4, 0, 1, 1)
+ self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.groupBox_3)
+ self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
+ self.groupBox_2.setObjectName("groupBox_2")
+ self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox_2)
+ self.gridLayout_4.setObjectName("gridLayout_4")
+ self.gridLayout_6 = QtWidgets.QGridLayout()
+ self.gridLayout_6.setObjectName("gridLayout_6")
+ self.raw_pushButton = QtWidgets.QPushButton(self.groupBox_2)
+ self.raw_pushButton.setObjectName("raw_pushButton")
+ self.gridLayout_6.addWidget(self.raw_pushButton, 0, 1, 1, 1)
+ self.wave_pushButton = QtWidgets.QPushButton(self.groupBox_2)
+ self.wave_pushButton.setObjectName("wave_pushButton")
+ self.gridLayout_6.addWidget(self.wave_pushButton, 0, 0, 1, 1)
+ self.gridLayout_4.addLayout(self.gridLayout_6, 0, 0, 1, 1)
+ self.tool_layout = QtWidgets.QHBoxLayout()
+ self.tool_layout.setObjectName("tool_layout")
+ self.gridLayout_4.addLayout(self.tool_layout, 2, 0, 1, 1)
+ self.gridLayout = QtWidgets.QGridLayout()
+ self.gridLayout.setObjectName("gridLayout")
+ self.gridLayout_4.addLayout(self.gridLayout, 1, 0, 1, 1)
+ self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.groupBox_2)
+ MainWindow.setCentralWidget(self.centralwidget)
+ self.menubar = QtWidgets.QMenuBar(MainWindow)
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1095, 23))
+ self.menubar.setObjectName("menubar")
+ MainWindow.setMenuBar(self.menubar)
+ self.statusbar = QtWidgets.QStatusBar(MainWindow)
+ self.statusbar.setObjectName("statusbar")
+ MainWindow.setStatusBar(self.statusbar)
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
+ self.groupBox_3.setTitle(_translate("MainWindow", "控制台"))
+ self.label_10.setText(_translate("MainWindow", "命令"))
+ self.wifi_command_pushButton_1.setText(_translate("MainWindow", "发送"))
+ self.groupBox_5.setTitle(_translate("MainWindow", "状态"))
+ self.groupBox_8.setTitle(_translate("MainWindow", "运行信息"))
+ self.label_6.setText(_translate("MainWindow", "BUCK"))
+ self.label_9.setText(_translate("MainWindow", "防逆流"))
+ self.label.setText(_translate("MainWindow", "驱动"))
+ self.label_3.setText(_translate("MainWindow", "EN"))
+ self.label_7.setText(_translate("MainWindow", "错误信息"))
+ self.label_8.setText(_translate("MainWindow", "0"))
+ self.groupBox_7.setTitle(_translate("MainWindow", "PWM值"))
+ self.label_5.setText(_translate("MainWindow", "PWMC:"))
+ self.pwmc_label.setText(_translate("MainWindow", "0"))
+ self.label_2.setText(_translate("MainWindow", "PWM"))
+ self.pwm_label.setText(_translate("MainWindow", "0"))
+ self.label_4.setText(_translate("MainWindow", "PPWM:"))
+ self.ppwm_label.setText(_translate("MainWindow", "0"))
+ self.groupBox_6.setTitle(_translate("MainWindow", "连接"))
+ self.label_11.setText(_translate("MainWindow", "目标IP"))
+ self.wifi_IP_lineEdit_3.setText(_translate("MainWindow", "192.168.5.63"))
+ self.label_12.setText(_translate("MainWindow", "本机IP"))
+ self.wifi_config_pushButton.setText(_translate("MainWindow", "设置"))
+ self.label_20.setText(_translate("MainWindow", "图表采样数"))
+ self.groupBox_4.setTitle(_translate("MainWindow", "参数校准"))
+ self.label_19.setText(_translate("MainWindow", "ADS712电流校准"))
+ self.INCD_pushButton.setText(_translate("MainWindow", "发送"))
+ self.label_17.setText(_translate("MainWindow", "输入采样电阻"))
+ self.RNFA_pushButton.setText(_translate("MainWindow", "发送"))
+ self.label_16.setText(_translate("MainWindow", "校准输入电压"))
+ self.INVD_pushButton.setText(_translate("MainWindow", "发送"))
+ self.label_18.setText(_translate("MainWindow", "输出采样电阻"))
+ self.RNFB_pushButton.setText(_translate("MainWindow", "发送"))
+ self.label_15.setText(_translate("MainWindow", "校准输出电压"))
+ self.OUTVD_pushButton.setText(_translate("MainWindow", "发送"))
+ self.groupBox_9.setTitle(_translate("MainWindow", "功能"))
+ self.SERIAL_pushButton.setText(_translate("MainWindow", "串口信息设置"))
+ self.ESPRESTART_pushButton.setText(_translate("MainWindow", "重启ESP32"))
+ self.FWUPDATE_pushButton.setText(_translate("MainWindow", "升级固件"))
+ self.groupBox_2.setTitle(_translate("MainWindow", "可视化图表"))
+ self.raw_pushButton.setText(_translate("MainWindow", "原始数据"))
+ self.wave_pushButton.setText(_translate("MainWindow", "波形图"))
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/main_ui.ui b/esp32_buck_boost/GUI/udpmonitor/gui/main_ui.ui
new file mode 100644
index 0000000..0cd6ed5
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/main_ui.ui
@@ -0,0 +1,519 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 1099
+ 681
+
+
+
+ MainWindow
+
+
+
+ -
+
+
+ 控制台
+
+
+
-
+
+
-
+
+
+ 命令
+
+
+
+ -
+
+
+ -
+
+
+ 发送
+
+
+
+
+
+ -
+
+
+ 状态
+
+
+
-
+
+
+ 运行信息
+
+
+
-
+
+
+ BUCK
+
+
+
+ -
+
+
+ 防逆流
+
+
+
+ -
+
+
-
+
+
+ 驱动
+
+
+
+ -
+
+
+ EN
+
+
+
+
+
+ -
+
+
-
+
+
+ 错误信息
+
+
+
+ -
+
+
+ 0
+
+
+
+
+
+
+
+
+ -
+
+
+ PWM值
+
+
+
-
+
+
-
+
+
+ PWMC:
+
+
+
+ -
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+ PWM
+
+
+
+ -
+
+
+ 0
+
+
+
+
+
+ -
+
+
-
+
+
+ PPWM:
+
+
+
+ -
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ 连接
+
+
+
-
+
+
+ 1
+
+
-
+
+
+ 目标IP
+
+
+
+ -
+
+
+ 192.168.5.63
+
+
+
+
+
+ -
+
+
+ 1
+
+
-
+
+
+ 本机IP
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ 设置
+
+
+
+
+
+ -
+
+
-
+
+
+ 图表采样数
+
+
+
+ -
+
+
+ 0
+
+
+ 300.000000000000000
+
+
+ 10000.000000000000000
+
+
+ 100.000000000000000
+
+
+ QAbstractSpinBox::AdaptiveDecimalStepType
+
+
+ 300.000000000000000
+
+
+
+
+
+
+
+
+ -
+
+
+ 参数校准
+
+
+
-
+
+
-
+
+
+ ADS712电流校准
+
+
+
+ -
+
+
+ 0.500000000000000
+
+
+ 10.000000000000000
+
+
+
+ -
+
+
+ 发送
+
+
+
+
+
+ -
+
+
-
+
+
+ 输入采样电阻
+
+
+
+ -
+
+
+ 4
+
+
+ 1.000000000000000
+
+
+ 0.001000000000000
+
+
+ 0.002000000000000
+
+
+
+ -
+
+
+ 发送
+
+
+
+
+
+ -
+
+
-
+
+
+ 校准输入电压
+
+
+
+ -
+
+
+ 3
+
+
+ 120.000000000000000
+
+
+ 0.500000000000000
+
+
+ 50.000000000000000
+
+
+
+ -
+
+
+ 发送
+
+
+
+
+
+ -
+
+
-
+
+
+ 输出采样电阻
+
+
+
+ -
+
+
+ 4
+
+
+ 1.000000000000000
+
+
+ 0.001000000000000
+
+
+ 0.002000000000000
+
+
+
+ -
+
+
+ 发送
+
+
+
+
+
+ -
+
+
-
+
+
+ 校准输出电压
+
+
+
+ -
+
+
+ 3
+
+
+ 0.100000000000000
+
+
+ 50.000000000000000
+
+
+
+ -
+
+
+ 发送
+
+
+
+
+
+
+
+
+ -
+
+
+ 功能
+
+
+
-
+
+
+ 串口信息设置
+
+
+
+ -
+
+
+ 重启ESP32
+
+
+
+ -
+
+
+ 升级固件
+
+
+
+
+
+
+
+
+
+ -
+
+
+ 可视化图表
+
+
+
-
+
+
-
+
+
+ 原始数据
+
+
+
+ -
+
+
+ 波形图
+
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/add.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/add.png
new file mode 100644
index 0000000..7038ea7
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/add.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/add_motor.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/add_motor.png
new file mode 100644
index 0000000..abcd9f1
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/add_motor.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/add_motor.psd b/esp32_buck_boost/GUI/udpmonitor/gui/resources/add_motor.psd
new file mode 100644
index 0000000..710bc29
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/add_motor.psd differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/alert.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/alert.png
new file mode 100644
index 0000000..3e73cac
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/alert.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/ard.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/ard.png
new file mode 100644
index 0000000..76fb459
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/ard.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/backward.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/backward.png
new file mode 100644
index 0000000..dedbb6f
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/backward.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/bluedot.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/bluedot.png
new file mode 100644
index 0000000..8ef6a0e
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/bluedot.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/configure.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/configure.png
new file mode 100644
index 0000000..da2e43e
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/configure.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/connect.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/connect.png
new file mode 100644
index 0000000..e09f443
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/connect.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/consoletool.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/consoletool.png
new file mode 100644
index 0000000..6e01693
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/consoletool.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/continue.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/continue.png
new file mode 100644
index 0000000..fd93351
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/continue.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/customcommands.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/customcommands.png
new file mode 100644
index 0000000..1bb8fb0
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/customcommands.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/delete.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/delete.png
new file mode 100644
index 0000000..3812bf0
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/delete.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/disconnect.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/disconnect.png
new file mode 100644
index 0000000..ba22f19
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/disconnect.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/edit.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/edit.png
new file mode 100644
index 0000000..21e2557
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/edit.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/fastbackward.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/fastbackward.png
new file mode 100644
index 0000000..aa5ec43
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/fastbackward.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/fastfordward.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/fastfordward.png
new file mode 100644
index 0000000..b4df987
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/fastfordward.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/fordward.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/fordward.png
new file mode 100644
index 0000000..9519656
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/fordward.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/form.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/form.png
new file mode 100644
index 0000000..7347e48
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/form.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/gear.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/gear.png
new file mode 100644
index 0000000..d7ab21f
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/gear.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/gen.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/gen.png
new file mode 100644
index 0000000..eab9676
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/gen.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/generalsettings.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/generalsettings.png
new file mode 100644
index 0000000..3c1e92c
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/generalsettings.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/greendot.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/greendot.png
new file mode 100644
index 0000000..36a4f2e
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/greendot.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/home.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/home.png
new file mode 100644
index 0000000..df519da
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/home.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/list.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/list.png
new file mode 100644
index 0000000..c6a49b5
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/list.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/loop.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/loop.png
new file mode 100644
index 0000000..665c8b6
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/loop.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/maroondot.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/maroondot.png
new file mode 100644
index 0000000..4b3fd5d
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/maroondot.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor.png
new file mode 100644
index 0000000..16bbf5c
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor.psd b/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor.psd
new file mode 100644
index 0000000..83c67a7
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor.psd differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor1.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor1.png
new file mode 100644
index 0000000..a97587d
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/motor1.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/open.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/open.png
new file mode 100644
index 0000000..9c1a1cb
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/open.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/orangedot.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/orangedot.png
new file mode 100644
index 0000000..6c0fc5c
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/orangedot.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/pause.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pause.png
new file mode 100644
index 0000000..c5c0f1a
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pause.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/pid.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pid.png
new file mode 100644
index 0000000..2f4130c
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pid.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/pidconfig.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pidconfig.png
new file mode 100644
index 0000000..8dbcac0
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pidconfig.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/pull.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pull.png
new file mode 100644
index 0000000..9232799
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/pull.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/purpledot.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/purpledot.png
new file mode 100644
index 0000000..8ff40fd
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/purpledot.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/push.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/push.png
new file mode 100644
index 0000000..c91bcb1
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/push.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/reddot.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/reddot.png
new file mode 100644
index 0000000..aeaa338
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/reddot.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/res.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/res.png
new file mode 100644
index 0000000..cc01c54
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/res.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/save.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/save.png
new file mode 100644
index 0000000..f637c76
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/save.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/send.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/send.png
new file mode 100644
index 0000000..b15e21d
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/send.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/sensor.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/sensor.png
new file mode 100644
index 0000000..30d33a4
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/sensor.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/start.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/start.png
new file mode 100644
index 0000000..91f057b
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/start.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/statistics.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/statistics.png
new file mode 100644
index 0000000..a1ae710
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/statistics.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/stop.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/stop.png
new file mode 100644
index 0000000..a5ccebf
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/stop.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/stopjogging.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/stopjogging.png
new file mode 100644
index 0000000..faa8b72
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/stopjogging.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/studioicon.icns b/esp32_buck_boost/GUI/udpmonitor/gui/resources/studioicon.icns
new file mode 100644
index 0000000..1e3ee0e
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/studioicon.icns differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/tree copy.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/tree copy.png
new file mode 100644
index 0000000..e683632
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/tree copy.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/tree.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/tree.png
new file mode 100644
index 0000000..a8437a9
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/tree.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/yellowdot.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/yellowdot.png
new file mode 100644
index 0000000..a2ab7f5
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/yellowdot.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/resources/zoomall.png b/esp32_buck_boost/GUI/udpmonitor/gui/resources/zoomall.png
new file mode 100644
index 0000000..f289a18
Binary files /dev/null and b/esp32_buck_boost/GUI/udpmonitor/gui/resources/zoomall.png differ
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/sharedcomponets.py b/esp32_buck_boost/GUI/udpmonitor/gui/sharedcomponets.py
new file mode 100644
index 0000000..60a49e4
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/sharedcomponets.py
@@ -0,0 +1,73 @@
+import os
+
+from PyQt5 import QtGui, QtWidgets, QtCore
+
+class GUIToolKit(object):
+ ''' This class is used to provide icons for the rest of the application
+ hiding the location of the resources
+ '''
+ RED_COLOR = (255, 92, 92)
+ GREEN_COLOR = (57, 217, 138)
+ BLUE_COLOR = (91, 141, 236)
+ ORANGE_COLOR = (253, 172, 66)
+ YELLOW_COLOR = (255,255,51)
+ PURPLE_COLOR = (75,0,130)
+ MAROON_COLOR = (222,184,135)
+
+ @staticmethod
+ def getIconByName(icoName):
+
+ file_index = {
+ 'add': 'add.png',
+ 'add_motor': 'add_motor.png',
+ 'tree': 'tree.png',
+ 'gen': 'gen.png',
+ 'home': 'home.png',
+ 'form': 'form.png',
+ 'edit': 'edit.png',
+ 'delete': 'delete.png',
+ 'statistics': 'statistics.png',
+ 'reddot': 'reddot.png',
+ 'orangedot': 'orangedot.png',
+ 'greendot': 'greendot.png',
+ 'bluedot': 'bluedot.png',
+ 'purpledot': 'purpledot.png',
+ 'yellowdot': 'yellowdot.png',
+ 'maroondot': 'maroondot.png',
+ 'send': 'send.png',
+ 'zoomall': 'zoomall.png',
+ 'connect': 'connect.png',
+ 'continue': 'continue.png',
+ 'alert': 'alert.png',
+ 'gear': 'gear.png',
+ 'generalsettings': 'generalsettings.png',
+ 'open': 'open.png',
+ 'loop': 'loop.png',
+ 'save': 'save.png',
+ 'stop': 'stop.png',
+ 'restart': 'continue.png',
+ 'res': 'res.png',
+ 'sensor': 'sensor.png',
+ 'start': 'start.png',
+ 'motor': 'motor.png',
+ 'pause': 'pause.png',
+ 'pull': 'pull.png',
+ 'push': 'push.png',
+ 'list': 'list.png',
+ 'disconnect': 'disconnect.png',
+ 'configure': 'configure.png',
+ 'pidconfig': 'pidconfig.png',
+ 'consoletool': 'consoletool.png',
+ 'fordward': 'fordward.png',
+ 'fastbackward': 'fastbackward.png',
+ 'backward': 'backward.png',
+ 'stopjogging': 'stopjogging.png',
+ 'fastfordward': 'fastfordward.png',
+ 'customcommands':'customcommands.png'
+ }
+ currentDir = os.path.dirname(__file__)
+ icon_path = os.path.join(currentDir, './resources', file_index[icoName])
+ icon = QtGui.QIcon()
+ icon.addPixmap(QtGui.QPixmap(icon_path), QtGui.QIcon.Normal,
+ QtGui.QIcon.Off)
+ return icon
\ No newline at end of file
diff --git a/esp32_buck_boost/GUI/udpmonitor/gui/wifi_udp.py b/esp32_buck_boost/GUI/udpmonitor/gui/wifi_udp.py
new file mode 100644
index 0000000..bbc98d5
--- /dev/null
+++ b/esp32_buck_boost/GUI/udpmonitor/gui/wifi_udp.py
@@ -0,0 +1,35 @@
+from socket import *
+class udp(object):
+ """wifi udp to esp32"""
+ def __init__(self, HOST = '192.168.5.63', PORT = 2333):
+
+ self.HOST = HOST
+ self.PORT = PORT
+ self.BUFSIZ = 1024
+ self.ADDRESS = (self.HOST, self.PORT)
+
+ self.udpClientSocket = socket(AF_INET, SOCK_DGRAM)
+
+ try:
+ s = socket(AF_INET, SOCK_DGRAM)
+ s.connect(('8.8.8.8', 80))
+ self.user_ip = s.getsockname()[0]
+ finally:
+ s.close()
+ def send_message(self,data):
+ if not data:
+ return 0
+ self.udpClientSocket.sendto(data.encode('utf-8'),self.ADDRESS)
+
+if __name__ == '__main__':
+ udp = udp()
+ while True:
+ data = input('>')
+ udp.send_message(data)
+ # 接收数据
+ data, ADDR = udp.udpClientSocket.recvfrom(udp.BUFSIZ)
+ if not data:
+ break
+ print("服务器端响应:", data.decode('utf-8'))
+
+ udp.udpClientSocket.close()
\ No newline at end of file