Commit 50425173 authored by Guillaume Blanchy's avatar Guillaume Blanchy
Browse files

Add default check for fw_in_csv an fw_in_zip

Showing with 14 additions and 1 deletion
+14 -1
......@@ -169,6 +169,12 @@ class OhmPi(object):
cmd_id : str, optional
Unique command identifier.
"""
# check arguments
if fw_in_csv is None:
fw_in_csv = self.settings['fw_in_csv']
if fw_in_zip is None:
fw_in_zip = self.settings['fw_in_zip']
# check if directory 'data' exists
ddir = os.path.split(filename)[0]
if os.path.exists(ddir) is not True:
......@@ -651,6 +657,12 @@ class OhmPi(object):
cmd_id : str, optional
Unique command identifier.
"""
# check arguments
if fw_in_csv is None:
fw_in_csv = self.settings['fw_in_csv']
if fw_in_zip is None:
fw_in_zip = self.settings['fw_in_zip']
# switch power on
self._hw.pwr_state = 'on'
self.status = 'running'
......
......@@ -7,6 +7,7 @@
"tx_volt": 5,
"duty_cycle": 0.5,
"strategy": "constant",
"fulldata": false,
"fw_in_csv": false,
"fw_in_zip": true,
"export_path": "data/measurements.csv"
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment