forked from M-Labs/thermostat
pytec: remove obsolete conversions
This commit is contained in:
parent
b176fc2788
commit
7c55e34145
|
@ -51,13 +51,11 @@ def recv_data(tec):
|
||||||
ch0 = data[0]
|
ch0 = data[0]
|
||||||
series_lock.acquire()
|
series_lock.acquire()
|
||||||
try:
|
try:
|
||||||
time = ch0['time'] / 1000.0
|
|
||||||
|
|
||||||
for k, s in series.items():
|
for k, s in series.items():
|
||||||
if k in ch0:
|
if k in ch0:
|
||||||
v = ch0[k]
|
v = ch0[k]
|
||||||
if type(v) is float:
|
if type(v) is float:
|
||||||
s.append(time, v)
|
s.append(ch0['time'], v)
|
||||||
finally:
|
finally:
|
||||||
series_lock.release()
|
series_lock.release()
|
||||||
|
|
||||||
|
@ -106,7 +104,7 @@ def animate(i):
|
||||||
else:
|
else:
|
||||||
max_y = max(max_y, max_y_)
|
max_y = max(max_y, max_y_)
|
||||||
|
|
||||||
if min_x is not None and max_x - TIME_WINDOW > min_x:
|
if min_x and max_x - TIME_WINDOW > min_x:
|
||||||
for s in series.values():
|
for s in series.values():
|
||||||
s.clip(max_x - TIME_WINDOW)
|
s.clip(max_x - TIME_WINDOW)
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue