diff --git a/design_viewer_v1.ui b/design_viewer_v1.ui
index c99fdc0..02ce863 100644
--- a/design_viewer_v1.ui
+++ b/design_viewer_v1.ui
@@ -72,9 +72,9 @@
680
- 30
- 851
- 41
+ 20
+ 1031
+ 51
@@ -85,6 +85,58 @@
+ -
+
+
+ Выбор устройства
+
+
+ false
+
+
+
+
+ 10
+ 10
+ 31
+ 20
+
+
+
+ 1
+
+
+ true
+
+
+
+
+
+ 10
+ 30
+ 31
+ 17
+
+
+
+ 2
+
+
+
+
+
+ 50
+ 20
+ 31
+ 17
+
+
+
+ 3
+
+
+
+
-
@@ -277,7 +329,7 @@
- 3
+ 1
diff --git a/project/__init__.py b/project/__init__.py
index 36f9895..31acbac 100644
--- a/project/__init__.py
+++ b/project/__init__.py
@@ -1,8 +1,7 @@
"""Режимы работы, переменные, влияющие на работу, которые с некоторой вероятностью будут меняться."""
-
DATA_RATE = 200 # скорость передачи данных
-# mes = "AT+CONA11899AA1670B\r\n"
-# mes = "AT+CONA11899AA21438\r\n" # для связи со стимулятором
-mes = "AT+CONA11899AA166E1\r\n" # для связи со стимулятором
+mes1 = "AT+CONA11899AA166E1\r\n" # для связи со стимулятором устройство 1
+mes2 = "AT+CONA11899AA21438\r\n" # для связи со стимулятором устройство 2
+mes3 = "AT+CONA11899AA1670B\r\n" # для связи со стимулятором устройство 3
diff --git a/project/view.py b/project/view.py
index a9e9703..e9baef5 100644
--- a/project/view.py
+++ b/project/view.py
@@ -17,7 +17,7 @@ from PyQt5 import QtCore
from pyqtgraph import TextItem
import pyqtgraph as pg
import project.controller as my_data
-from project import mes
+from project import mes1, mes2, mes3
# выбор режима чения из файла или из com-порта
MODE_COM_PORT = False
@@ -282,7 +282,12 @@ class Ui(QtWidgets.QMainWindow):
self.serial.setPortName(self.Port_ch.currentText())
self.serial.open(QIODevice.ReadWrite)
self.serial.flush()
- self.serial.write(mes.encode())
+ if self.device1_radioButton.isChecked():
+ self.serial.write(mes1.encode())
+ if self.device2_radioButton.isChecked():
+ self.serial.write(mes2.encode())
+ if self.device3_radioButton.isChecked():
+ self.serial.write(mes3.encode())
self.on_close()
MODE_COM_PORT = True
self.graph_init()
@@ -598,6 +603,7 @@ class Ui(QtWidgets.QMainWindow):
self.Close_file.setVisible(True)
self.Restart.setVisible(True)
self.horizontalScrollBar.setVisible(False)
+ self.device_groupBox.setVisible(True)
else:
self.on_stop()
self.OpenB.setVisible(True)
@@ -613,6 +619,7 @@ class Ui(QtWidgets.QMainWindow):
self.Close_file.setVisible(False)
self.Restart.setVisible(False)
self.horizontalScrollBar.setVisible(True)
+ self.device_groupBox.setVisible(False)
def set_send_mode(self):
"""Установка режима передачи данных (Bluetooth/433)"""
diff --git a/viewer.exe b/viewer.exe
index 727f24b..737a1a4 100644
Binary files a/viewer.exe and b/viewer.exe differ