dev/sw #14

Merged
baulin.fa merged 8 commits from dev/sw into master 2026-06-19 13:20:59 +03:00
6 changed files with 1218 additions and 373 deletions
Showing only changes of commit 99d4eb976f - Show all commits

View File

@ -231,10 +231,6 @@ class MainWindow(QMainWindow):
self.accum_width = 32
# 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_global_settings()
@ -525,9 +521,9 @@ class MainWindow(QMainWindow):
self.set_max_pulse_width(self.nmax * self.window_size)
# 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
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.box_pulse_period.setMinimum(self.window_size)
@ -641,12 +637,7 @@ class MainWindow(QMainWindow):
if not ip:
raise ValueError("IP адрес не задан")
# ВАЖНО:
# В 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
data_width = self.accum_width // 8
return ReflectometerConfig(
ip=ip,