diff --git a/design_viewer_v1.ui b/design_viewer_v1.ui index 24210d4..76cf96f 100644 --- a/design_viewer_v1.ui +++ b/design_viewer_v1.ui @@ -2345,7 +2345,7 @@ 40 - + 10 @@ -2361,7 +2361,7 @@ Qt::AlignCenter - + 180 @@ -2662,7 +2662,7 @@ Qt::AlignCenter - + 90 @@ -2697,7 +2697,7 @@ - + 20 @@ -2751,29 +2751,7 @@ true - - - - 390 - 650 - 81 - 21 - - - - 30 - - - 120 - - - 5 - - - 70 - - - + 330 @@ -2783,35 +2761,13 @@ - t1, мс/10 + t1, мс Qt::AlignCenter - - - - 390 - 680 - 81 - 21 - - - - 10 - - - 40 - - - 5 - - - 25 - - - + 330 @@ -2821,35 +2777,13 @@ - t2, мс/10 + t2, мс Qt::AlignCenter - - - - 390 - 710 - 81 - 21 - - - - 20 - - - 100 - - - 5 - - - 60 - - - + 330 @@ -2859,13 +2793,13 @@ - t3, мс/10 + t3, мс Qt::AlignCenter - + 390 @@ -2881,13 +2815,13 @@ 80 - 5 + 1 50 - + 330 @@ -2903,7 +2837,7 @@ Qt::AlignCenter - + 390 @@ -2913,19 +2847,19 @@ - 20 - - - 80 - - 5 - + 50 + + 1 + + + 27 + - + 330 @@ -2941,6 +2875,81 @@ Qt::AlignCenter + + + + 390 + 650 + 81 + 21 + + + + 1 + + + 3.000000000000000 + + + 12.000000000000000 + + + 0.100000000000000 + + + 7.000000000000000 + + + + + + 390 + 680 + 81 + 21 + + + + 1 + + + 1.000000000000000 + + + 3.000000000000000 + + + 0.100000000000000 + + + 2.000000000000000 + + + + + + 390 + 710 + 81 + 21 + + + + 1 + + + 2.000000000000000 + + + 10.000000000000000 + + + 0.100000000000000 + + + 6.000000000000000 + + level High_Tf_spinBox High_Tt2_spinBox @@ -2961,8 +2970,8 @@ min_energy_spinBox max_energy_l max_energy_spinBox - cap_polarity_l - cap_polarity_BOX + hv_polarity_l + hv_polarity_BOX hv_blind_time_spinBox hv_blind_time_l standby_timer_l @@ -2976,53 +2985,53 @@ picture_3 picture_1 c_level - mode_BOX - mode + hv_mode_BOX + hv_mode picture_5 picture_4 - t1m_spinBox - t1m_l - t2m_spinBox - t2m_l - t3m_spinBox - t3m_l - u1m_spinBox - u1m_l - u2m_spinBox - u2m_l + t1_hv_phase_1_duration_l + t2_hv_switch_duration_l + t3_hv_phase_2_duration_l + u1_hv_switching_voltage_spinBox + u1_hv_switching_voltage_l + u2_hv_cutoff_voltage_spinBox + u2_hv_cutoff_voltage_l + t1_hv_phase_1_duration_SpinBox + t2_hv_switch_duration_SpinBox + t3_hv_phase_2_duration_SpinBox НВ стимуляция - + 340 - 60 + 160 61 22 - t1, мс/10 + t1, мс Qt::AlignCenter - + 340 - 90 + 190 61 21 - t2, мс/10 + t2, мс Qt::AlignCenter @@ -3032,7 +3041,7 @@ 20 - 20 + 120 301 221 @@ -3047,71 +3056,27 @@ true - - - - 400 - 30 - 81 - 21 - - - - 1 - - - 10 - - - 5 - - - 5 - - - - - - 400 - 60 - 81 - 21 - - - - 0 - - - 50 - - - 5 - - - 25 - - - + 330 - 30 + 130 71 22 - u, В/10 + u, В Qt::AlignCenter - + 400 - 90 + 190 81 21 @@ -3120,15 +3085,333 @@ 0 - 30 + 20 - 5 + 1 - 15 + 10 + + + + 120 + 70 + 151 + 22 + + + + + 0 + 2 + + + + true + + + None + + + 0 + + + + None + + + + + VOO + + + + + VVI + + + + + BURST + + + + + + + 20 + 70 + 61 + 22 + + + + Режим + + + Qt::AlignCenter + + + + + + 20 + 30 + 91 + 22 + + + + Полярность + + + Qt::AlignCenter + + + + + + 120 + 30 + 151 + 22 + + + + + 0 + 2 + + + + true + + + mono + + + 0 + + + + mono + + + + + bipolar + + + + + + + 400 + 160 + 81 + 21 + + + + 1 + + + 0.100000000000000 + + + 2.000000000000000 + + + 0.100000000000000 + + + 1.000000000000000 + + + + + + 400 + 130 + 81 + 21 + + + + 1 + + + 1.000000000000000 + + + 8.000000000000000 + + + 0.100000000000000 + + + 3.000000000000000 + + + + + + 0 + 360 + 491 + 131 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + 0 + 0 + 71 + 20 + + + + + 75 + true + true + + + + BURST + + + Qt::AlignCenter + + + + + + 190 + 30 + 81 + 21 + + + + 5 + + + 50 + + + 1 + + + 25 + + + + + + 0 + 30 + 191 + 21 + + + + Кол-во импульсов в пачке + + + Qt::AlignCenter + + + + + + 10 + 60 + 101 + 22 + + + + U импульсов, В + + + Qt::AlignCenter + + + + + + 190 + 60 + 81 + 21 + + + + 1 + + + 1.000000000000000 + + + 8.000000000000000 + + + 0.100000000000000 + + + 4.000000000000000 + + + + + + 190 + 90 + 81 + 21 + + + + 150 + + + 500 + + + 10 + + + 250 + + + + + + 10 + 90 + 181 + 21 + + + + T следования импульсов, мс + + + Qt::AlignCenter + + + diff --git a/project/controller.py b/project/controller.py index 7b879bd..b7e9240 100644 --- a/project/controller.py +++ b/project/controller.py @@ -209,6 +209,21 @@ class DataClass: self.Vs_cnt = 0 # счетчик Vs self.sub_mode = 0 # текущий подрежим терапии self.terapy_now = 0 # текущий режим терапии + self.burst_period = 0 # период следования импульсов при НВ стимуляции + self.burst_voltage = 0 # напряжение импульсов при НВ стимуляции + self.burst_cnt = 0 # количество импульсов в пачке при НВ стимуляции + self.lv_relax_time = 0 # время стабилизации после НВ стимуляции + self.lv_shock_time = 0 # время импульса НВ стимуляции + self.hv_polarity = 0 # полярность + self.hv_mode = 0 # режим высоковольтной стимуляции + self.hv_phase_1_duration = 0 # время положительной полуволны + self.hv_switch_duration = 0 # время задержки + self.hv_phase_2_duration = 0 # время отрицательной полуволны + self.hv_switching_voltage = 0 # процент от максимального напряжения для смены полярности + self.hv_cutoff_voltage = 0 # процент от максимального напряжения для окончания стимуляции + self.lv_voltage = 0 # напряжение НВ стимуляции + self.lv_mode = 0 # режим низковольтной стимуляции + self.lv_polarity = 0 # полярность для НВ def clear_data(self): """ @@ -347,7 +362,7 @@ class DataClass: """ Парсинг с 23 по 30 байт (передача значений в зависимости от остатка от деления счетчика) """ - if self.counter[self.draw_cnt] % 10 == 0: + if self.counter[self.draw_cnt] % 12 == 0: int1 = (shift_or(int.from_bytes(self.data_rx[self.pac_count + 23], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 24], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 25], "big", signed=False), @@ -361,7 +376,7 @@ class DataClass: self.ECG_RA_max_threshold[self.draw_cnt] = struct.unpack('f', int1.to_bytes(4, 'big'))[0] self.max_treshold = self.ECG_RA_max_threshold[self.draw_cnt] - if self.counter[self.draw_cnt] % 10 == 1: + if self.counter[self.draw_cnt] % 12 == 1: int1 = ( shift_or(int.from_bytes(self.data_rx[self.pac_count + 23], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 24], "big", signed=False), @@ -369,7 +384,7 @@ class DataClass: int.from_bytes(self.data_rx[self.pac_count + 26], "big", signed=False))) self.square_coef = struct.unpack('f', int1.to_bytes(4, 'big'))[0] - if self.counter[self.draw_cnt] % 10 == 2: + if self.counter[self.draw_cnt] % 12 == 2: self.square_time = ( shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 29], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 30], "big", signed=False))) @@ -377,7 +392,7 @@ class DataClass: shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 27], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 28], "big", signed=False))) - if self.counter[self.draw_cnt] % 10 == 3: + if self.counter[self.draw_cnt] % 12 == 3: int1 = int.from_bytes(self.data_rx[self.pac_count + 24], "big") self.sd_card = (int1 & 0x4) >> 2 self.channel = int1 & 0x3 @@ -391,7 +406,7 @@ class DataClass: shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 29], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 30], "big", signed=False))) - if self.counter[self.draw_cnt] % 10 == 4: + if self.counter[self.draw_cnt] % 12 == 4: self.last_period[self.draw_cnt] = ( shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 27], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 28], "big", signed=False))) @@ -400,7 +415,7 @@ class DataClass: shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 25], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 26], "big", signed=False))) - if self.counter[self.draw_cnt] % 10 == 5: + if self.counter[self.draw_cnt] % 12 == 5: self.Vs_cnt = ( shift_or_24(int.from_bytes(self.data_rx[self.pac_count + 23], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 24], "big", signed=False), @@ -414,7 +429,7 @@ class DataClass: int.from_bytes(self.data_rx[self.pac_count + 27], "big", signed=False), )) - if self.counter[self.draw_cnt] % 10 == 6: + if self.counter[self.draw_cnt] % 12 == 6: self.fibr_tres = ( shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 23], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 24], "big", signed=False) @@ -428,7 +443,7 @@ class DataClass: int.from_bytes(self.data_rx[self.pac_count + 28], "big", signed=False) )) - if self.counter[self.draw_cnt] % 10 == 7: + if self.counter[self.draw_cnt] % 12 == 7: self.fibr_cnt = int.from_bytes(self.data_rx[self.pac_count + 25], "big") self.tachy_2_cnt = int.from_bytes(self.data_rx[self.pac_count + 26], "big") self.tachy_1_cnt = int.from_bytes(self.data_rx[self.pac_count + 27], "big") @@ -438,7 +453,7 @@ class DataClass: shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 23], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 24], "big", signed=False))) - if self.counter[self.draw_cnt] % 10 == 8: + if self.counter[self.draw_cnt] % 12 == 8: self.now_energy = (shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 27], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 28], "big", @@ -453,7 +468,7 @@ class DataClass: self.hv_step_cnt = int1 & 0xF self.hv_step_number = (int1 & 0xF0) >> 4 - if self.counter[self.draw_cnt] % 10 == 9: + if self.counter[self.draw_cnt] % 12 == 9: self.hv_blind_time = ( shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 23], "big", signed=False), int.from_bytes(self.data_rx[self.pac_count + 24], "big", signed=False))) @@ -470,3 +485,26 @@ class DataClass: int1 = int.from_bytes(self.data_rx[self.pac_count + 25], "big", signed=False) self.redet_bad = int1 & 0xF self.redet_num = (int1 & 0xF0) >> 4 + + if self.counter[self.draw_cnt] % 12 == 10: + int1 = int.from_bytes(self.data_rx[self.pac_count + 23], "big") + self.lv_polarity = (int1 & 0xF0) >> 4 + self.lv_mode = int1 & 0xF + self.lv_voltage = int.from_bytes(self.data_rx[self.pac_count + 26], "big") + self.lv_shock_time = int.from_bytes(self.data_rx[self.pac_count + 24], "big") + self.lv_relax_time = int.from_bytes(self.data_rx[self.pac_count + 25], "big") + self.burst_cnt = int.from_bytes(self.data_rx[self.pac_count + 27], "big") + self.burst_voltage = int.from_bytes(self.data_rx[self.pac_count + 28], "big") + self.burst_period = ( + shift_or_16(int.from_bytes(self.data_rx[self.pac_count + 29], "big", signed=False), + int.from_bytes(self.data_rx[self.pac_count + 30], "big", signed=False))) + + if self.counter[self.draw_cnt] % 12 == 11: + int1 = int.from_bytes(self.data_rx[self.pac_count + 23], "big") + self.hv_polarity = (int1 & 0xF0) >> 4 + self.hv_mode = int1 & 0xF + self.hv_phase_1_duration = int.from_bytes(self.data_rx[self.pac_count + 24], "big") + self.hv_switch_duration = int.from_bytes(self.data_rx[self.pac_count + 26], "big") + self.hv_phase_2_duration = int.from_bytes(self.data_rx[self.pac_count + 25], "big") + self.hv_switching_voltage = int.from_bytes(self.data_rx[self.pac_count + 27], "big") + self.hv_cutoff_voltage = int.from_bytes(self.data_rx[self.pac_count + 28], "big") diff --git a/project/view.py b/project/view.py index 918826e..6ec5af4 100644 --- a/project/view.py +++ b/project/view.py @@ -103,17 +103,31 @@ class Ui(QtWidgets.QMainWindow): self.hv_step_number_spinBox.valueChanged.connect(self.set_hv_step_number_spinBox) self.min_energy_spinBox.valueChanged.connect(self.set_min_energy_spinBox) self.max_energy_spinBox.valueChanged.connect(self.set_max_energy_spinBox) - self.cap_polarity_BOX.editTextChanged.connect(self.set_cap_polarity_BOX) + self.hv_polarity_BOX.editTextChanged.connect(self.set_hv_polarity_BOX) self.hv_blind_time_spinBox.valueChanged.connect(self.set_hv_blind_time_spinBox) self.standby_timer_spinBox.valueChanged.connect(self.set_standby_timer_spinBox) self.redet_num_spinBox.valueChanged.connect(self.set_redet_num_spinBox) self.redet_bad_spinBox.valueChanged.connect(self.set_redet_bad_spinBox) self.Spi_spot_set_spinBox.valueChanged.connect(self.set_Spi_spot_set_spinBox) - self.mode_BOX.editTextChanged.connect(self.set_mode_BOX) - self.u1m_l.setVisible(False) - self.u2m_l.setVisible(False) - self.u1m_spinBox.setVisible(False) - self.u2m_spinBox.setVisible(False) + self.hv_mode_BOX.editTextChanged.connect(self.set_hv_mode_BOX) + self.t1_hv_phase_1_duration_SpinBox.valueChanged.connect(self.set_t1_hv_phase_1_duration_SpinBox) + self.t2_hv_switch_duration_SpinBox.valueChanged.connect(self.set_t2_hv_switch_duration_SpinBox) + self.t3_hv_phase_2_duration_SpinBox.valueChanged.connect(self.set_t3_hv_phase_2_duration_SpinBox) + self.u1_hv_switching_voltage_spinBox.valueChanged.connect(self.set_u1_hv_switching_voltage_spinBox) + self.u2_hv_cutoff_voltage_spinBox.valueChanged.connect(self.set_u2_hv_cutoff_voltage_spinBox) + self.lv_polarity_BOX.editTextChanged.connect(self.set_lv_polarity_BOX) + self.lv_mode_BOX.editTextChanged.connect(self.set_lv_mode_BOX) + self.u_lv_voltage_SpinBox.valueChanged.connect(self.set_u_lv_voltage_SpinBox) + self.t1_lv_shock_time_SpinBox.valueChanged.connect(self.set_t1_lv_shock_time_SpinBox) + self.t2_lv_relax_time_spinBox.valueChanged.connect(self.set_t2_lv_relax_time_spinBox) + self.burst_cnt_spinBox.valueChanged.connect(self.set_burst_cnt_spinBox) + self.burst_voltage_SpinBox.valueChanged.connect(self.set_burst_voltage_SpinBox) + self.burst_period_spinBox.valueChanged.connect(self.set_burst_period_spinBox) + self.u1_hv_switching_voltage_l.setVisible(False) + self.u2_hv_cutoff_voltage_l.setVisible(False) + self.u1_hv_switching_voltage_spinBox.setVisible(False) + self.u2_hv_cutoff_voltage_spinBox.setVisible(False) + self.burst_frame.setVisible(False) set_up_controls() @@ -191,6 +205,22 @@ class Ui(QtWidgets.QMainWindow): self.redet_bad_spinBox.setValue(data_in.redet_bad) self.Work_Mode_pacemaker.setCurrentIndex(data_in.Work_Mode_pacemaker) self.Spi_spot_set_spinBox.setValue(data_in.spi_pot_set) + self.hv_polarity_BOX.setValue(data_in.hv_polarity) + self.hv_mode_BOX.setValue(data_in.hv_mode) + self.t1_hv_phase_1_duration_SpinBox.setValue(data_in.hv_phase_1_duration / 10.0) + self.t3_hv_phase_2_duration_SpinBox.setValue(data_in.hv_phase_2_duration / 10.0) + self.t2_hv_switch_duration_SpinBox.setValue(data_in.hv_switch_duration / 10.0) + self.u1_hv_switching_voltage_spinBox.setValue(data_in.hv_switching_voltage) + self.u2_hv_cutoff_voltage_spinBox.setValue(data_in.hv_cutoff_voltage) + self.lv_polarity_BOX.setValue(data_in.lv_polarity) + self.lv_mode_BOX.setValue(data_in.lv_mode) + self.t1_lv_shock_time_SpinBox().setValue(data_in.lv_shock_time / 10.0) + self.t2_lv_relax_time_spinBox().setValue(data_in.lv_relax_time) + self.u_lv_voltage_SpinBox().setValue(data_in.lv_voltage / 10.0) + self.burst_cnt_spinBox.setValue(data_in.burst_cnt) + self.burst_voltage_SpinBox.setValue(data_in.burst_voltage / 10.0) + self.burst_period.setValue(data_in.burst_period) + def timerEvent(self): if MODE_COM_PORT: @@ -674,9 +704,9 @@ class Ui(QtWidgets.QMainWindow): """Визуализация корзины тахикардии 1ст""" self.progressBar_t1.setMaximum(self.t1_count_spinBox.value()) - def set_cap_polarity_BOX(self): + def set_hv_polarity_BOX(self): """Выбор полярности""" - param = self.cap_polarity_BOX.currentIndex() + param = int(self.hv_polarity_BOX.currentIndex()) match param: case 0: self.picture_1.setVisible(True) @@ -690,23 +720,90 @@ class Ui(QtWidgets.QMainWindow): self.picture_3.setVisible(True) self.picture_1.setVisible(False) self.picture_2.setVisible(False) + my_data.state_packet(self.send_mode, self.serial, 0x30, param, 1, int) - def set_mode_BOX(self): + def set_hv_mode_BOX(self): """Выбор режима высоковольтной стимуляции""" - param = self.mode_BOX.currentIndex() + param = int(self.hv_mode_BOX.currentIndex()) match param: case 0: self.picture_4.setVisible(True) self.picture_5.setVisible(False) - self.u1m_l.setVisible(False) - self.u2m_l.setVisible(False) - self.u1m_spinBox.setVisible(False) - self.u2m_spinBox.setVisible(False) + self.u1_hv_switching_voltage_l.setVisible(False) + self.u2_hv_cutoff_voltage_l.setVisible(False) + self.u1_hv_switching_voltage_spinBox.setVisible(False) + self.u2_hv_cutoff_voltage_spinBox.setVisible(False) case 1: self.picture_5.setVisible(True) self.picture_4.setVisible(False) - self.u1m_l.setVisible(True) - self.u2m_l.setVisible(True) - self.u1m_spinBox.setVisible(True) - self.u2m_spinBox.setVisible(True) + self.u1_hv_switching_voltage_l.setVisible(True) + self.u2_hv_cutoff_voltage_l.setVisible(True) + self.u1_hv_switching_voltage_spinBox.setVisible(True) + self.u2_hv_cutoff_voltage_spinBox.setVisible(True) + my_data.state_packet(self.send_mode, self.serial, 0x31, param, 1, int) + def set_t1_hv_phase_1_duration_SpinBox(self): + """Выбор времени положительной полуволны""" + param = int(self.t1_hv_phase_1_duration_SpinBox.value()*10) + my_data.state_packet(self.send_mode, self.serial, 0x32, param, 1, int) + + def set_t2_hv_switch_duration_SpinBox(self): + """Выбор времени задержки""" + param = int(self.t2_hv_switch_duration_SpinBox.value()*10) + my_data.state_packet(self.send_mode, self.serial, 0x34, param, 1, int) + + def set_t3_hv_phase_2_duration_SpinBox(self): + """Выбор времени отрицательной полуволны""" + param = int(self.t3_hv_phase_2_duration_SpinBox.value()*10) + my_data.state_packet(self.send_mode, self.serial, 0x33, param, 1, int) + + def set_u1_hv_switching_voltage_spinBox(self): + """Выбор процента от максимального напряжения для смены полярности""" + param = int(self.u1_hv_switching_voltage_spinBox.value()) + my_data.state_packet(self.send_mode, self.serial, 0x35, param, 1, int) + + def set_u2_hv_cutoff_voltage_spinBox(self): + """Выбор процента от максимального напряжения для окончания стимуляции""" + param = int(self.u2_hv_cutoff_voltage_spinBox.value()) + my_data.state_packet(self.send_mode, self.serial, 0x36, param, 1, int) + + def set_lv_mode_BOX(self): + """Выбор режима низковольтной стимуляции""" + param = self.lv_mode_BOX.currentIndex() + match param: + case 3: + self.burst_frame.setVisible(True) + case _: + self.burst_frame.setVisible(False) + my_data.state_packet(self.send_mode, self.serial, 0x23, param, 1, int) + + def set_lv_polarity_BOX(self): + """Выбор полярности для НВ""" + param = int(self.lv_polarity_BOX.currentIndex()) + my_data.state_packet(self.send_mode, self.serial, 0x22, param, 1, int) + + def set_u_lv_voltage_SpinBox(self): + """Выбор напряжения НВ стимуляции""" + param = int(self.u_lv_voltage_SpinBox.value()*10) + my_data.state_packet(self.send_mode, self.serial, 0x26, param, 1, int) + + def set_t1_lv_shock_time_SpinBox(self): + """Выбор времени импульса НВ стимуляции""" + param = int(self.t1_lv_shock_time_SpinBox.value() * 10) + 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) + my_data.state_packet(self.send_mode, self.serial, 0x25, param, 1, int) + def set_burst_cnt_spinBox(self): + """Выбор количества импульсов в пачке при НВ стимуляции""" + param = self.burst_cnt_spinBox.value() + my_data.state_packet(self.send_mode, self.serial, 0x27, param, 1, int) + def set_burst_voltage_SpinBox(self): + """Выбор напряжения импульсов при НВ стимуляции""" + param = int(self.burst_voltage_SpinBox.value() * 10) + my_data.state_packet(self.send_mode, self.serial, 0x28, param, 1, int) + def set_burst_period_spinBox(self): + """Выбор периода следования импульсов при НВ стимуляции""" + param = self.burst_period_spinBox.value() + my_data.state_packet(self.send_mode, self.serial, 0x29, param, 2, int) \ No newline at end of file