diff options
Diffstat (limited to 'rfGen.py')
-rw-r--r-- | rfGen.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5,13 +5,15 @@ import time # For sleep, clock, time and perf_counter from datetime import datetime, timedelta class rfGenLMX2487: - def __init__(self, port='/dev/ttyUSB0', speed=115200, timeout=1): + def __init__(self, port='/dev/ttyUSB0', speed=115200, timeout=1, setToDefaults=True): self.port = port self.speed = speed self.timeout = timeout self.connection = serial.Serial( self.port, self.speed, timeout=self.timeout) self.log = [] self.logCapacity = 10 + if setToDefaults: + self.sendSerialCmd("set_lmx2487_board_to_default_state()") def add2log(self, text): self.log.append(text) |