aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-17 18:01:32 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-06-17 18:02:07 -0400
commit987ef732065f1296de45b9b83f0dcce9bd41311b (patch)
tree1a56afeadea98b488f9819d1fd463d00c17da8b7
parent34aa435652c7535fba438d791c4a7413a3a537f7 (diff)
downloadpyExpControl-3.1.tar.gz
pyExpControl-3.1.zip
new flag setToDefaults in rfGenLMX2487v3.1
-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)