ctb and moench: wrong firmware will set numchannels to 0 and this will throw when updating detector size, binaries in

This commit is contained in:
2021-08-20 14:03:43 +02:00
parent 9158a3c8b0
commit b37db1de72
6 changed files with 15 additions and 10 deletions

View File

@ -290,6 +290,11 @@ void DetectorImpl::updateDetectorSize() {
LOG(logDEBUG) << "Updating Multi-Detector Size: " << size();
const slsDetectorDefs::xy det_size = detectors[0]->getNumberOfChannels();
if (det_size.x == 0 || det_size.y == 0) {
throw sls::RuntimeError("Module size for x or y dimensions is 0. Unable to proceed in updating detector size. ");
}
int maxx = multi_shm()->numberOfChannels.x;
int maxy = multi_shm()->numberOfChannels.y;
int ndetx = 0, ndety = 0;