diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-12 14:25:07 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-06-12 14:25:07 -0400 |
commit | 0d88defb2469ab4f696880ffa41f153265acd307 (patch) | |
tree | e75130cb45f8a6f686ed51a079606f9c0de1f9ea | |
parent | 4ce9600f5c0c1e2bd5a19a496af0b3401938b80d (diff) | |
download | pyExpControl-0d88defb2469ab4f696880ffa41f153265acd307.tar.gz pyExpControl-0d88defb2469ab4f696880ffa41f153265acd307.zip |
added rfGenLMX2487Dummy dummy RF generator
-rw-r--r-- | eitControl.py | 15 | ||||
-rw-r--r-- | rfGen.py | 6 |
2 files changed, 13 insertions, 8 deletions
diff --git a/eitControl.py b/eitControl.py index e9cda92..d4ae123 100644 --- a/eitControl.py +++ b/eitControl.py @@ -18,7 +18,7 @@ import csv import ue9qol from funcGenerator import Sweeper, SinGen, TriangleGen, RampGen, PulseGen -from rfGen import rfGenLMX2487 +import rfGen class Experiment: @@ -55,15 +55,14 @@ class Experiment: if args.test: print("Test mode, run with fake hardware") self.hardware['LabJack'] = ue9qol.UE9qolDummy() + self.hardware['rfGen'] = rfGen.rfGenLMX2487Dummy(port='/dev/ttyUSB0', speed=115200, timeout=1) else: self.hardware['LabJack'] = ue9qol.UE9qol() - - if platform.system() == 'Linux': - rf=rfGenLMX2487(port='/dev/ttyUSB0', speed=115200, timeout=1) - else: - rf=rfGenLMX2487(port='COM5', speed=115200, timeout=1) - self.hardware['rfGen'] = rf - + if platform.system() == 'Linux': + rf=rfGen.rfGenLMX2487(port='/dev/ttyUSB0', speed=115200, timeout=1) + else: + rf=rfGen.rfGenLMX2487(port='COM5', speed=115200, timeout=1) + self.hardware['rfGen'] = rf def guiSetup(self, root): self.cntrlPannel=ttk.LabelFrame(root, text='controls') @@ -40,3 +40,9 @@ class rfGenLMX2487: cmd_str=f'setFreq({freq:.2f})' self.sendSerialCmd(cmd_str) +class rfGenLMX2487Dummy: + def __init__(self, port='/dev/ttyUSB0', speed=115200, timeout=1): + return + + def setFreq(self,freq): + return |