GUI: Sample camera settings fixed
Build and Publish / build (push) Successful in 22s

This commit is contained in:
leonarski_f committed 2025-06-21 14:17:21 +02:00
1 parent 90b4207a34
commit 8b72e7f5d1
1 file changed
+7 -3
+7 -3
View File
@@ -26,7 +26,8 @@ class SamcamPanel(QWidget):
self.exposure_spinbox.setSingleStep(0.001)
self.exposure_spinbox.setStyleSheet("QDoubleSpinBox { background-color: white; }")
self.exposure_spinbox.setDecimals(3)
self.exposure_spinbox.editingFinished.connect(self.__changed)
self.exposure_spinbox.valueChanged.connect(self.__changed)
exposure_layout.addWidget(exposure_label)
exposure_layout.addWidget(self.exposure_spinbox)
@@ -38,7 +39,7 @@ class SamcamPanel(QWidget):
self.gain_spinbox.setSingleStep(1)
self.gain_spinbox.setDecimals(1)
self.gain_spinbox.setStyleSheet("QDoubleSpinBox { background-color: white; }")
self.gain_spinbox.editingFinished.connect(self.__changed)
self.gain_spinbox.valueChanged.connect(self.__changed)
gain_layout.addWidget(gain_label)
gain_layout.addWidget(self.gain_spinbox)
@@ -53,8 +54,11 @@ class SamcamPanel(QWidget):
@Slot(DAQStatusModel)
def update_daq_status(self, s: DAQStatusModel):
pass
if self.old_settings != s.bl.sample_camera:
self.exposure_spinbox.blockSignals(True)
self.gain_spinbox.blockSignals(True)
self.gain_spinbox.setValue(s.bl.sample_camera.gain)
self.exposure_spinbox.setValue(s.bl.sample_camera.exposure)
self.exposure_spinbox.blockSignals(False)
self.gain_spinbox.blockSignals(False)
self.old_settings = s.bl.sample_camera