sw: fix gui console data recv

This commit is contained in:
Phil
2026-05-26 16:36:03 +03:00
parent d925a4ffaa
commit 99d4eb976f

View File

@ -231,10 +231,6 @@ class MainWindow(QMainWindow):
self.accum_width = 32 self.accum_width = 32
# setup # setup
self.set_max_pulse_height(100)
self.set_max_pulse_width(500)
self.set_max_pulse_period(1000)
self.set_max_pulse_num(20)
self.setup_pulse_controls() self.setup_pulse_controls()
self.setup_global_settings() self.setup_global_settings()
@ -525,9 +521,9 @@ class MainWindow(QMainWindow):
self.set_max_pulse_width(self.nmax * self.window_size) self.set_max_pulse_width(self.nmax * self.window_size)
# accum_width + adc_width -> max pulse num # accum_width + adc_width -> max pulse num
self.set_max_pulse_num(2 ** (self.accum_width - self.adc_dw)) self.set_max_pulse_num(2 ** (self.accum_width - self.adc_dw) - 1)
# dac_width -> max pulse height # dac_width -> max pulse height
self.set_max_pulse_height(2 ** self.dac_dw) self.set_max_pulse_height(2 ** self.dac_dw - 1)
self.slider_pulse_period.setMinimum(self.window_size) self.slider_pulse_period.setMinimum(self.window_size)
self.box_pulse_period.setMinimum(self.window_size) self.box_pulse_period.setMinimum(self.window_size)
@ -641,12 +637,7 @@ class MainWindow(QMainWindow):
if not ip: if not ip:
raise ValueError("IP адрес не задан") raise ValueError("IP адрес не задан")
# ВАЖНО: data_width = self.accum_width // 8
# В console.py data_width был в байтах: 4 для int32.
# Если у тебя box_adc_dw хранит именно 4, оставь так.
# Если box_adc_dw хранит 32 бита, замени на:
# data_width = self.adc_dw // 8
data_width = self.adc_dw // 8
return ReflectometerConfig( return ReflectometerConfig(
ip=ip, ip=ip,