mirror of
https://github.com/nqrduck/nqrduck-spectrometer-limenqr.git
synced 2024-12-23 07:57:47 +00:00
Add setting for TX/RX channel
This commit is contained in:
parent
1413a28ad1
commit
346c4297bf
2 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue