Add setting for TX/RX channel

This commit is contained in:
jupfi 2024-02-12 10:09:03 +01:00
parent 1413a28ad1
commit 346c4297bf
2 changed files with 4 additions and 0 deletions

View file

@ -237,6 +237,8 @@ class LimeNQRController(BaseSpectrometerController):
# Acquisiton settings # Acquisiton settings
if setting.name == self.module.model.SAMPLING_FREQUENCY: if setting.name == self.module.model.SAMPLING_FREQUENCY:
lime.srate = setting.get_setting() lime.srate = setting.get_setting()
elif setting.name == self.module.model.CHANNEL:
lime.channel = setting.get_setting()
# Careful this doesn't only set the IF frequency but the local oscillator frequency # Careful this doesn't only set the IF frequency but the local oscillator frequency
elif setting.name == self.module.model.IF_FREQUENCY: elif setting.name == self.module.model.IF_FREQUENCY:
lime.frq = self.module.model.target_frequency - setting.get_setting() lime.frq = self.module.model.target_frequency - setting.get_setting()

View file

@ -7,6 +7,7 @@ logger = logging.getLogger(__name__)
class LimeNQRModel(BaseSpectrometerModel): class LimeNQRModel(BaseSpectrometerModel):
# Setting constants for the names of the spectrometer settings # Setting constants for the names of the spectrometer settings
CHANNEL = "TX/RX Channel"
SAMPLING_FREQUENCY = "Sampling Frequency" SAMPLING_FREQUENCY = "Sampling Frequency"
IF_FREQUENCY = "IF Frequency" IF_FREQUENCY = "IF Frequency"
ACQUISITION_TIME = "Acquisition time" ACQUISITION_TIME = "Acquisition time"
@ -49,6 +50,7 @@ class LimeNQRModel(BaseSpectrometerModel):
def __init__(self, module) -> None: def __init__(self, module) -> None:
super().__init__(module) super().__init__(module)
# Acquisition settings # Acquisition settings
self.add_setting(self.CHANNEL, 0, "TX/RX Channel", self.ACQUISITION)
self.add_setting(self.SAMPLING_FREQUENCY, 30.72e6 , "Sampling frequency", self.ACQUISITION) self.add_setting(self.SAMPLING_FREQUENCY, 30.72e6 , "Sampling frequency", self.ACQUISITION)
self.add_setting(self.IF_FREQUENCY, 5e6, "IF Frequency", self.ACQUISITION) self.add_setting(self.IF_FREQUENCY, 5e6, "IF Frequency", self.ACQUISITION)
self.if_frequency = 1.2e6 self.if_frequency = 1.2e6