Temporary shim in case minimum heartrate period is empty

This commit is contained in:
Nate Schoolfield 2021-01-27 04:03:16 -08:00
parent 313d172eb2
commit ad0a150846
1 changed files with 4 additions and 1 deletions

View File

@ -196,6 +196,9 @@ def average_raw_data(tick_time):
else:
print("({}) Period data empty: {}".format(data_type,
period_seconds))
if data_type == "heartrate" and period_seconds == min(periods):
period_data_average = last_heartrate
else:
period_data_average = 0
period_averages_dict[period_seconds] = zero_to_nan(period_data_average)