aboutsummaryrefslogtreecommitdiff
path: root/rfGen.py
diff options
context:
space:
mode:
Diffstat (limited to 'rfGen.py')
-rw-r--r--rfGen.py4
1 files changed, 3 insertions, 1 deletions
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)