gRPC: Mask application during conversion is part of internal settings and is not part of easy accessible settings (to ensure it is always applied)

This commit is contained in:
2023-07-01 19:20:19 +02:00
parent a66ac66d0b
commit 8a203b7cf5
4 changed files with 112 additions and 111 deletions
+4 -3
View File
@@ -54,6 +54,8 @@ DiffractionExperiment::DiffractionExperiment(const DetectorSetup& det_setup) {
dataset.set_rad_int_solid_angle_corr(false);
dataset.set_save_calibration(false);
internal.set_debug_pixel_mask(false);
internal.set_ndatastreams(1);
internal.set_frame_time_us(MIN_FRAME_TIME_HALF_SPEED_IN_US);
@@ -921,7 +923,6 @@ void DiffractionExperiment::LoadDatasetSettings(const JFJochProtoBuf::DatasetSet
if (settings.has_scattering_vector())
ScatteringVector({0,0,1});
Compression(settings.compression());
ApplyPixelMaskInFPGA(!settings.debug_pixel_mask());
Binning2x2(settings.binning2x2());
} catch (...) {
dataset = tmp;
@@ -1083,13 +1084,13 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
}
DiffractionExperiment &DiffractionExperiment::ApplyPixelMaskInFPGA(bool input) {
dataset.set_debug_pixel_mask(!input);
internal.set_debug_pixel_mask(!input);
return *this;
}
bool DiffractionExperiment::GetApplyPixelMaskInFPGA() const {
if (GetDetectorMode() == DetectorMode::Conversion)
return !dataset.debug_pixel_mask();
return !internal.debug_pixel_mask();
else
return false;
}