Commit 5633a6ba authored by Reto Da Forno's avatar Reto Da Forno
Browse files

only generate csv file for powerprofiling if at least one observer uses csv format

parent 6c07ad3b
......@@ -1179,6 +1179,14 @@ def main(argv):
elif service == 'gpiotracing':
header = 'timestamp,observer_id,node_id,pin_name,value\n'
elif service == 'powerprofiling':
# determine whether at least one observer uses CSV format
usesCSV = False
for obs in powerprofconf:
if powerprofconf[obs]['format'] == 'csv':
usesCSV = True
if not usesCSV:
continue # skip file creation (rld format is selected on all observers)
header = 'timestamp,observer_id,node_id,current_mA,voltage_V\n'
elif service == 'serial':
header = 'timestamp,observer_id,node_id,direction,output\n'
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