Fixed bug with gate enable.

This commit is contained in:
jupfi 2024-04-02 16:19:11 +02:00
parent 5b05499498
commit 2029cc71c8

View file

@ -243,7 +243,7 @@ class LimeNQRController(BaseSpectrometerController):
"Updating settings for spectrometer: %s for measurement", "Updating settings for spectrometer: %s for measurement",
self.module.model.name, self.module.model.name,
) )
lime.c3_tim = [0, 0, 0, 0] c3_tim = [0, 0, 0, 0]
# I don't like this code # I don't like this code
for category in self.module.model.settings.keys(): for category in self.module.model.settings.keys():
for setting in self.module.model.settings[category]: for setting in self.module.model.settings[category]:
@ -265,13 +265,13 @@ class LimeNQRController(BaseSpectrometerController):
lime.rectime_secs = setting.get_setting() lime.rectime_secs = setting.get_setting()
# Gate settings # Gate settings
elif setting.name == self.module.model.GATE_ENABLE: elif setting.name == self.module.model.GATE_ENABLE:
lime.c3_tim[0] = int(setting.get_setting()) c3_tim[0] = int(setting.value)
elif setting.name == self.module.model.GATE_PADDING_LEFT: elif setting.name == self.module.model.GATE_PADDING_LEFT:
lime.c3_tim[1] = int(setting.get_setting()) c3_tim[1] = int(setting.get_setting())
elif setting.name == self.module.model.GATE_SHIFT: elif setting.name == self.module.model.GATE_SHIFT:
lime.c3_tim[2] = int(setting.get_setting()) c3_tim[2] = int(setting.get_setting())
elif setting.name == self.module.model.GATE_PADDING_RIGHT: elif setting.name == self.module.model.GATE_PADDING_RIGHT:
lime.c3_tim[3] = int(setting.get_setting()) c3_tim[3] = int(setting.get_setting())
# RX/TX settings # RX/TX settings
elif setting.name == self.module.model.TX_GAIN: elif setting.name == self.module.model.TX_GAIN:
lime.TX_gain = setting.get_setting() lime.TX_gain = setting.get_setting()
@ -306,6 +306,7 @@ class LimeNQRController(BaseSpectrometerController):
elif setting.name == self.module.model.RX_PHASE_ADJUSTMENT: elif setting.name == self.module.model.RX_PHASE_ADJUSTMENT:
lime.RX_IQcorrPhase = setting.get_setting() lime.RX_IQcorrPhase = setting.get_setting()
lime.c3_tim = c3_tim
return lime return lime
def translate_pulse_sequence(self, lime): def translate_pulse_sequence(self, lime):