fixed crash from calibration

This commit is contained in:
Blake Leverington 2024-08-06 14:41:14 +02:00
parent 18b22d87d5
commit aa3c506327
6 changed files with 8 additions and 6 deletions

View File

@ -110,6 +110,8 @@ void Device::configure(DeviceConfig &cfg)
ctrlSetSlaveDelay(deviceConfig.slave_delay); ctrlSetSlaveDelay(deviceConfig.slave_delay);
ctrlSetGain(deviceConfig.gain); ctrlSetGain(deviceConfig.gain);
ctrlSetClusterThreshold(deviceConfig.threshold); ctrlSetClusterThreshold(deviceConfig.threshold);
ctrlSetClusterSize(deviceConfig.clustersize);
//ctrlSetCalibrationFactor(deviceConfig.calibrationFactor);
ctrlConfigBunch(deviceConfig.dma_bunch, deviceConfig.eth_bunch); ctrlConfigBunch(deviceConfig.dma_bunch, deviceConfig.eth_bunch);
ctrlConfigPeer(ipshort, DEV_BASE_DATA_PORT+ deviceConfig.device_id); ctrlConfigPeer(ipshort, DEV_BASE_DATA_PORT+ deviceConfig.device_id);
} }

View File

@ -1,9 +1,9 @@
[Global] [Global]
NrDevices=2 NrDevices=1
HostIp=10.0.7.1 HostIp=10.0.7.1
[Device0] [Device0]
IP=10.0.7.17 IP=10.0.7.19
HardwareVer=2 HardwareVer=2
Plane=0 Plane=0
Position=0 Position=0
@ -13,7 +13,8 @@ MasterDelay=61
SlaveDelay=34 SlaveDelay=34
Threshold=10 Threshold=10
Size=4 Size=4
CalibFile= CalibFile=C:/Users/lhcb/Desktop/program_fpga_rms_cali/calibration_factor/board0.txt
ClusterSize=4
[Device1] [Device1]
IP=10.0.7.18 IP=10.0.7.18

View File

@ -340,7 +340,7 @@ int DialogDevices::validateAndSave()
deviceSettings->setValue("MasterDelay", ui->tableDevices->item(dev_nr,6)->text()); deviceSettings->setValue("MasterDelay", ui->tableDevices->item(dev_nr,6)->text());
deviceSettings->setValue("SlaveDelay", ui->tableDevices->item(dev_nr,7)->text()); deviceSettings->setValue("SlaveDelay", ui->tableDevices->item(dev_nr,7)->text());
deviceSettings->setValue("Threshold", ui->tableDevices->item(dev_nr,8)->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()); deviceSettings->setValue("CalibFile", ui->tableDevices->item(dev_nr, 10)->text());
} }

View File

@ -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 // Assume calibration factors are stored as a list or comma-separated string
QString calibFactorsStr = deviceSettings->value("CalibFactors").toString(); QString calibFactorsStr = deviceSettings->value("CalibFactors").toString();

Binary file not shown.