Minor typo

This commit is contained in:
Nate Schoolfield 2021-01-27 01:03:37 -08:00
parent c23c3a4c81
commit 313d172eb2
2 changed files with 7 additions and 3 deletions

View File

@ -157,7 +157,7 @@ def flush_old_raw_data(tick_time):
for data_type in sleep_data: for data_type in sleep_data:
s_data = sleep_data[data_type] s_data = sleep_data[data_type]
periods = s_datum['periods'] periods = s_data['periods']
cleaned_raw_data = [] cleaned_raw_data = []
@ -186,7 +186,7 @@ def average_raw_data(tick_time):
for period_seconds in periods: for period_seconds in periods:
period_data = [] period_data = []
period_averages_dict[period_seconds] = 0 period_averages_dict[period_seconds] = 0
for raw_datum in s_datum['raw_data']: for raw_datum in s_data['raw_data']:
datum_age_seconds = tick_time - raw_datum['time'] datum_age_seconds = tick_time - raw_datum['time']
if datum_age_seconds < period_seconds: if datum_age_seconds < period_seconds:
period_data.append(raw_datum[value_name]) period_data.append(raw_datum[value_name])
@ -286,7 +286,7 @@ def graph_animation(i):
for data_type in sleep_data: for data_type in sleep_data:
s_data = sleep_data[data_type] s_data = sleep_data[data_type]
g_data = graph_data[data_type] g_data = graph_data[data_type]
if len(g_datum['time']) > 0: if len(g_data['time']) > 0:
plotflag = True plotflag = True
data_periods = sleep_data[data_type]['periods'] data_periods = sleep_data[data_type]['periods']
for period in data_periods: for period in data_periods:

4
sleepdata.py Normal file
View File

@ -0,0 +1,4 @@
class SleepData():
def __init__(self):
print("init")