mirror of
https://github.com/skaringa/water-counter.git
synced 2024-11-22 01:14:24 +01:00
Pause detection fixed
This commit is contained in:
parent
bc2d29d27c
commit
99c57b9c19
@ -62,7 +62,7 @@ def detect_pauses(data):
|
|||||||
for (ts, counter) in data:
|
for (ts, counter) in data:
|
||||||
if counter > start_counter:
|
if counter > start_counter:
|
||||||
duration = ts - start_time
|
duration = ts - start_time
|
||||||
if duration > min_pause:
|
if duration >= min_pause:
|
||||||
result.append({'start' : start_time, 'duration' : duration})
|
result.append({'start' : start_time, 'duration' : duration})
|
||||||
start_time = ts
|
start_time = ts
|
||||||
start_counter = counter
|
start_counter = counter
|
||||||
|
Loading…
Reference in New Issue
Block a user