Minor changes to data ingestion pipeline
This commit is contained in:
parent
ea2bc8b96b
commit
dcef35b3b2
|
@ -11,7 +11,7 @@ SERIAL_PATH = "/dev/ttyUSB0"
|
|||
SERIAL_BAUD = 115200
|
||||
|
||||
SAMPLE_PERIOD = 0.2
|
||||
DECIMATION_RATE = 10
|
||||
DECIMATION_RATE = 5
|
||||
|
||||
is_mock = os.environ['MOCK']
|
||||
if is_mock:
|
||||
|
@ -167,7 +167,6 @@ try:
|
|||
humidity = float(parts[0])
|
||||
temp = float(parts[1])
|
||||
volts = float(parts[2])
|
||||
print(humidity, temp, volts)
|
||||
if first_sample:
|
||||
humidifier_history[:] = humidity
|
||||
first_sample = False
|
||||
|
@ -188,6 +187,7 @@ try:
|
|||
humidifier.toggle(s)
|
||||
|
||||
if frame_num == 0:
|
||||
print(humidity, temp, volts)
|
||||
update = {
|
||||
"data": {
|
||||
"time": int(now*1000),
|
||||
|
|
|
@ -13,7 +13,9 @@ async def connect_stdin_stdout():
|
|||
|
||||
async def pipe_loop(reader, writer):
|
||||
while True:
|
||||
#res = await reader.readline()
|
||||
res = await reader.read(1024)
|
||||
#res = await reader.readchunk()
|
||||
if not res:
|
||||
break
|
||||
writer.write(res)
|
||||
|
|
Loading…
Reference in New Issue