1
0
Fork 0
Browse Source

add save function for time-stamps with readings above threshold.

This is not exactly encoded into the code itself. It's implied and
needs to be used with that in mind. It's more of 'save list'
function. I will probably rename/refactor this in the future depending
on how the project develops.
stable
Craig Oates 3 years ago
parent
commit
2cbecc0d2c
  1. 6
      src/services/io_services.py

6
src/services/io_services.py

@ -15,3 +15,9 @@ def save_rps_totals(totals, path):
wtr = csv.writer(result)
for k, v in totals.items():
wtr.writerow([k,v])
def save_rps_above_threshold(readings, path):
with open(path, mode="w", newline='') as result:
wtr = csv.writer(result)
for item in readings:
wtr.writerow([item])