diff --git a/linien-gui/linien_gui/ui/general_panel.py b/linien-gui/linien_gui/ui/general_panel.py
index cad2d91..499146d 100644
--- a/linien-gui/linien_gui/ui/general_panel.py
+++ b/linien-gui/linien_gui/ui/general_panel.py
@@ -48,6 +48,8 @@ class GeneralPanel(QtWidgets.QWidget):
polarityContainerFastOut2: QtWidgets.QWidget
polarityComboBoxFastOut2: QtWidgets.QComboBox
modulationChannelComboBox: QtWidgets.QComboBox
+ afeGainComboBoxFastIn1: QtWidgets.QComboBox
+ afeGainComboBoxFastIn2: QtWidgets.QComboBox
def __init__(self, *args, **kwargs) -> None:
super(GeneralPanel, self).__init__(*args, **kwargs)
@@ -80,6 +82,14 @@ class GeneralPanel(QtWidgets.QWidget):
self.on_polarity_analog_out0_changed
)
+ self.afeGainComboBoxFastIn1.currentIndexChanged.connect(
+ self.on_afe_gain_in1_changed
+ )
+
+ self.afeGainComboBoxFastIn2.currentIndexChanged.connect(
+ self.on_afe_gain_in2_changed
+ )
+
for idx in range(1, 4):
element: CustomDoubleSpinBoxNoSign = getattr(
self, f"analogOutComboBox{idx}"
@@ -126,6 +136,9 @@ class GeneralPanel(QtWidgets.QWidget):
param2ui(self.parameters.polarity_fast_out2, self.polarityComboBoxFastOut2)
param2ui(self.parameters.polarity_analog_out0, self.polarityComboBoxAnalogOut0)
+ param2ui(self.parameters.adc_afe_10x_gain_1, self.afeGainComboBoxFastIn1)
+ param2ui(self.parameters.adc_afe_10x_gain_2, self.afeGainComboBoxFastIn2)
+
self.parameters.control_channel.add_callback(self.show_polarity_settings)
self.parameters.sweep_channel.add_callback(self.show_polarity_settings)
self.parameters.mod_channel.add_callback(self.show_polarity_settings)
@@ -211,6 +224,14 @@ class GeneralPanel(QtWidgets.QWidget):
self.parameters.polarity_analog_out0.value = bool(polarity)
self.control.write_registers()
+ def on_afe_gain_in1_changed(self, polarity):
+ self.parameters.adc_afe_10x_gain_1.value = bool(polarity)
+ self.control.write_registers()
+
+ def on_afe_gain_in2_changed(self, polarity):
+ self.parameters.adc_afe_10x_gain_2.value = bool(polarity)
+ self.control.write_registers()
+
def show_polarity_settings(self, *args):
used_channels = {
self.parameters.control_channel.value,
diff --git a/linien-gui/linien_gui/ui/general_panel.ui b/linien-gui/linien_gui/ui/general_panel.ui
index 6c2bd45..79f4580 100644
--- a/linien-gui/linien_gui/ui/general_panel.ui
+++ b/linien-gui/linien_gui/ui/general_panel.ui
@@ -508,6 +508,74 @@
+ -
+
+
-
+
+
+ <html><head/><body><p><span style=" font-weight:600;">FAST IN 1 GAIN</span></p></body></html>
+
+
+ Qt::AutoText
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
-
+
+ 1x
+
+
+ -
+
+ 10x
+
+
+
+
+
+
+ -
+
+
-
+
+
+ <html><head/><body><p><span style=" font-weight:600;">FAST IN 2 GAIN</span></p></body></html>
+
+
+ Qt::AutoText
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
-
+
+ 1x
+
+
+ -
+
+ 10x
+
+
+
+
+
+
-