diff --git a/hit2023v2_RMS/device.cpp b/hit2023v2_RMS/device.cpp index 8d6169e..885de39 100644 --- a/hit2023v2_RMS/device.cpp +++ b/hit2023v2_RMS/device.cpp @@ -110,6 +110,8 @@ void Device::configure(DeviceConfig &cfg) ctrlSetSlaveDelay(deviceConfig.slave_delay); ctrlSetGain(deviceConfig.gain); ctrlSetClusterThreshold(deviceConfig.threshold); + ctrlSetClusterSize(deviceConfig.clustersize); + //ctrlSetCalibrationFactor(deviceConfig.calibrationFactor); ctrlConfigBunch(deviceConfig.dma_bunch, deviceConfig.eth_bunch); ctrlConfigPeer(ipshort, DEV_BASE_DATA_PORT+ deviceConfig.device_id); } diff --git a/hit2023v2_RMS/device_config.ini b/hit2023v2_RMS/device_config.ini index 20833f5..2b5051d 100644 --- a/hit2023v2_RMS/device_config.ini +++ b/hit2023v2_RMS/device_config.ini @@ -1,9 +1,9 @@ [Global] -NrDevices=2 +NrDevices=1 HostIp=10.0.7.1 [Device0] -IP=10.0.7.17 +IP=10.0.7.19 HardwareVer=2 Plane=0 Position=0 @@ -13,7 +13,8 @@ MasterDelay=61 SlaveDelay=34 Threshold=10 Size=4 -CalibFile= +CalibFile=C:/Users/lhcb/Desktop/program_fpga_rms_cali/calibration_factor/board0.txt +ClusterSize=4 [Device1] IP=10.0.7.18 diff --git a/hit2023v2_RMS/dialogdevices.cpp b/hit2023v2_RMS/dialogdevices.cpp index 62b3075..c15eb0b 100644 --- a/hit2023v2_RMS/dialogdevices.cpp +++ b/hit2023v2_RMS/dialogdevices.cpp @@ -340,7 +340,7 @@ int DialogDevices::validateAndSave() deviceSettings->setValue("MasterDelay", ui->tableDevices->item(dev_nr,6)->text()); deviceSettings->setValue("SlaveDelay", ui->tableDevices->item(dev_nr,7)->text()); deviceSettings->setValue("Threshold", ui->tableDevices->item(dev_nr,8)->text()); - deviceSettings->setValue("Size", ui->tableDevices->item(dev_nr,9)->text()); + deviceSettings->setValue("ClusterSize", ui->tableDevices->item(dev_nr,9)->text()); deviceSettings->setValue("CalibFile", ui->tableDevices->item(dev_nr, 10)->text()); } diff --git a/hit2023v2_RMS/mainwindow.cpp b/hit2023v2_RMS/mainwindow.cpp index 5719682..02599f1 100644 --- a/hit2023v2_RMS/mainwindow.cpp +++ b/hit2023v2_RMS/mainwindow.cpp @@ -172,8 +172,7 @@ void MainWindow::setupHardware() } - dc.threshold = deviceSettings->value("Threshold").toInt(); - dc.clustersize = deviceSettings->value("ClusterSize").toInt(); + /* // Assume calibration factors are stored as a list or comma-separated string QString calibFactorsStr = deviceSettings->value("CalibFactors").toString(); diff --git a/hit2023v2_RMS/release/hit2023v2.exe b/hit2023v2_RMS/release/hit2023v2.exe index 58b5d0d..6e7f8a3 100644 Binary files a/hit2023v2_RMS/release/hit2023v2.exe and b/hit2023v2_RMS/release/hit2023v2.exe differ diff --git a/hit2023v2_RMS/release/hit2023v2.exe.debug b/hit2023v2_RMS/release/hit2023v2.exe.debug index 0181876..655da7a 100644 Binary files a/hit2023v2_RMS/release/hit2023v2.exe.debug and b/hit2023v2_RMS/release/hit2023v2.exe.debug differ