From 987ef732065f1296de45b9b83f0dcce9bd41311b Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Thu, 17 Jun 2021 18:01:32 -0400 Subject: new flag setToDefaults in rfGenLMX2487 --- rfGen.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rfGen.py b/rfGen.py index 5100362..3084664 100644 --- a/rfGen.py +++ b/rfGen.py @@ -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) -- cgit v1.2.3