Add parameters

This commit is contained in:
SimonovaMI 2025-08-24 17:43:20 +03:00
parent 5c36b8050c
commit d01568c9a9
4 changed files with 113 additions and 17 deletions

View File

@ -277,7 +277,7 @@
</rect>
</property>
<property name="currentIndex">
<number>3</number>
<number>1</number>
</property>
<widget class="QWidget" name="visual">
<attribute name="title">
@ -1271,7 +1271,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<y>220</y>
<width>211</width>
<height>20</height>
</rect>
@ -1294,7 +1294,7 @@
<property name="geometry">
<rect>
<x>9</x>
<y>220</y>
<y>280</y>
<width>221</width>
<height>22</height>
</rect>
@ -1313,7 +1313,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>279</y>
<y>339</y>
<width>241</width>
<height>22</height>
</rect>
@ -1332,7 +1332,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>308</y>
<y>368</y>
<width>221</width>
<height>22</height>
</rect>
@ -1351,7 +1351,7 @@
<property name="geometry">
<rect>
<x>270</x>
<y>220</y>
<y>280</y>
<width>61</width>
<height>22</height>
</rect>
@ -1417,7 +1417,7 @@
<property name="geometry">
<rect>
<x>10</x>
<y>249</y>
<y>309</y>
<width>221</width>
<height>22</height>
</rect>
@ -1436,7 +1436,7 @@
<property name="geometry">
<rect>
<x>270</x>
<y>250</y>
<y>310</y>
<width>61</width>
<height>22</height>
</rect>
@ -1497,7 +1497,7 @@
<property name="geometry">
<rect>
<x>270</x>
<y>280</y>
<y>340</y>
<width>61</width>
<height>22</height>
</rect>
@ -1538,7 +1538,7 @@
<property name="geometry">
<rect>
<x>270</x>
<y>310</y>
<y>370</y>
<width>61</width>
<height>22</height>
</rect>
@ -1574,7 +1574,7 @@
<property name="geometry">
<rect>
<x>9</x>
<y>191</y>
<y>251</y>
<width>221</width>
<height>22</height>
</rect>
@ -1602,7 +1602,7 @@
<property name="geometry">
<rect>
<x>270</x>
<y>190</y>
<y>250</y>
<width>61</width>
<height>22</height>
</rect>
@ -1658,7 +1658,7 @@
<property name="geometry">
<rect>
<x>270</x>
<y>340</y>
<y>400</y>
<width>61</width>
<height>22</height>
</rect>
@ -1715,7 +1715,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>337</y>
<y>397</y>
<width>261</width>
<height>22</height>
</rect>
@ -1734,7 +1734,7 @@
<property name="geometry">
<rect>
<x>270</x>
<y>370</y>
<y>430</y>
<width>61</width>
<height>22</height>
</rect>
@ -1753,7 +1753,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>370</y>
<y>430</y>
<width>251</width>
<height>22</height>
</rect>
@ -1945,6 +1945,84 @@
</property>
</item>
</widget>
<widget class="QLabel" name="HV_label">
<property name="geometry">
<rect>
<x>20</x>
<y>140</y>
<width>171</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Высоковольтная стимуляция</string>
</property>
</widget>
<widget class="QLabel" name="LV_label">
<property name="geometry">
<rect>
<x>20</x>
<y>170</y>
<width>171</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Низковольтная стимуляция</string>
</property>
</widget>
<widget class="QComboBox" name="HV_Box">
<property name="geometry">
<rect>
<x>190</x>
<y>140</y>
<width>91</width>
<height>20</height>
</rect>
</property>
<property name="currentText">
<string>неактивна</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>неактивна</string>
</property>
</item>
<item>
<property name="text">
<string>активна</string>
</property>
</item>
</widget>
<widget class="QComboBox" name="LV_Box">
<property name="geometry">
<rect>
<x>190</x>
<y>170</y>
<width>91</width>
<height>20</height>
</rect>
</property>
<property name="currentText">
<string>неактивна</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>неактивна</string>
</property>
</item>
<item>
<property name="text">
<string>активна</string>
</property>
</item>
</widget>
</widget>
</widget>
<widget class="QWidget" name="tab">

View File

@ -173,6 +173,8 @@ class DataClass:
self.dc_cut = 1 # вывод сигнала с постоянной составляющей или без
self.channel = 3 # активный канал передачи
self.signal = 0 # вывод сигнала с фильтром или без
self.hv = 0 # активация режима высоковльтной стимуляции
self.lv = 0 # активация режима низковольтной стимуляции
self.sd_card = 0 # запись на sd-карту
self.hv_volt = 0 # напряжение на конденсаторе
self.bat_volt = 0 # напряжение на батарее
@ -357,6 +359,8 @@ class DataClass:
self.rr_now[self.draw_cnt] = (int1 & 0x4) >> 2
self.Work_Mode_pacemaker = (int1 & 0x60) >> 5
self.signal = (int1 & 0x80) >> 7
self.lv = (int1 & 0x10) >> 4
self.hv = (int1 & 0x8) >> 3
def parse_part_from_23_to_30_byte(self):
"""

View File

@ -93,6 +93,8 @@ class Ui(QtWidgets.QMainWindow):
self.Signal_Box.currentIndexChanged.connect(self.set_Signal_Box)
self.Channel_Box.currentIndexChanged.connect(self.set_Channel_Box)
self.DC_cut_Box.currentIndexChanged.connect(self.set_DC_cut_Box)
self.HV_Box.currentIndexChanged.connect(self.set_HV_Box)
self.LV_Box.currentIndexChanged.connect(self.set_LV_Box)
# fixed
self.High_Tf_spinBox.valueChanged.connect(self.set_High_Tf_spinBox)
self.High_Tt2_spinBox.valueChanged.connect(self.set_High_Tt2_spinBox)
@ -186,6 +188,8 @@ class Ui(QtWidgets.QMainWindow):
self.Signal_Box.setCurrentIndex(int(data_in.signal))
self.Channel_Box.setCurrentIndex(int(data_in.channel))
self.DC_cut_Box.setCurrentIndex(int(data_in.dc_cut))
self.HV_Box.setCurrentIndex(int(data_in.hv))
self.LV_Box.setCurrentIndex(int(data_in.lv))
self.RA_max_time_ms_BOX.setEditText(str(data_in.max_search_time))
self.RA_min_sensitivity_BOX.setEditText(str(data_in.min_treshold))
self.RA_max_sensitivity_BOX.setEditText(str(data_in.max_treshold))
@ -583,6 +587,16 @@ class Ui(QtWidgets.QMainWindow):
param = int(self.DC_cut_Box.currentIndex())
my_data.state_packet(self.send_mode, self.serial, 0x21, param, 1, int)
def set_HV_Box(self):
"""Настройка активации режима высоковольтной стимуляции"""
param = int(self.HV_Box.currentIndex())
my_data.state_packet(self.send_mode, self.serial, 0x0F, param, 1, int)
def set_LV_Box(self):
"""Настройка активации режима низковольтной стимуляции"""
param = int(self.LV_Box.currentIndex())
my_data.state_packet(self.send_mode, self.serial, 0x0E, param, 1, int)
def set_Signal_Box(self):
"""Настройка вывода сигнала с/без фильтром(а)"""
param = int(self.Signal_Box.currentIndex())
@ -801,7 +815,7 @@ class Ui(QtWidgets.QMainWindow):
my_data.state_packet(self.send_mode, self.serial, 0x24, param, 1, int)
def set_t2_lv_relax_time_spinBox(self):
"""Выбор времени стабилизации после НВ стимуляции"""
param = int(self.t2_lv_relax_time_spinBox.value() * 10)
param = int(self.t2_lv_relax_time_spinBox.value())
my_data.state_packet(self.send_mode, self.serial, 0x25, param, 1, int)
def set_burst_cnt_spinBox(self):
"""Выбор количества импульсов в пачке при НВ стимуляции"""

Binary file not shown.