the calibration now accepts 1 channel at a time
This commit is contained in:
parent
818fdc8197
commit
7fb74c4bcc
@ -111,7 +111,7 @@ void Device::configure(DeviceConfig &cfg)
|
|||||||
ctrlSetGain(deviceConfig.gain);
|
ctrlSetGain(deviceConfig.gain);
|
||||||
ctrlSetClusterThreshold(deviceConfig.threshold);
|
ctrlSetClusterThreshold(deviceConfig.threshold);
|
||||||
ctrlSetClusterSize(deviceConfig.clustersize);
|
ctrlSetClusterSize(deviceConfig.clustersize);
|
||||||
//ctrlSetCalibrationFactor(deviceConfig.calibrationFactor);
|
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);
|
||||||
}
|
}
|
||||||
@ -519,15 +519,22 @@ int Device::ctrlSetCalibrationFactor(int calibrationFactor[320])
|
|||||||
|
|
||||||
QVector<unsigned short> rxdata;
|
QVector<unsigned short> rxdata;
|
||||||
QVector<unsigned short> txdata;
|
QVector<unsigned short> txdata;
|
||||||
|
int status = -1;
|
||||||
// Append each calibration factor to txdata
|
// Append each calibration factor to txdata
|
||||||
for (int i = 0; i < 320; ++i)
|
for (int i = 0; i < 320; ++i)
|
||||||
{
|
{
|
||||||
|
txdata.append(static_cast<unsigned short>(i));
|
||||||
txdata.append(static_cast<unsigned short>(calibrationFactor[i]));
|
txdata.append(static_cast<unsigned short>(calibrationFactor[i]));
|
||||||
|
// Perform the queryCtrl operation with the populated txdata
|
||||||
|
status = queryCtrl(COMMAND_SET_CALIBRATION_FACTOR, txdata, rxdata);
|
||||||
|
rxdata.clear();
|
||||||
|
txdata.clear();
|
||||||
|
//if (status == DEV_CTRL_ERROR) {return DEV_CTRL_ERROR;}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform the queryCtrl operation with the populated txdata
|
return DEV_CTRL_OK;
|
||||||
return queryCtrl(COMMAND_SET_CALIBRATION_FACTOR, txdata, rxdata);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user