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,7 +196,10 @@ def average_raw_data(tick_time):
else: else:
print("({}) Period data empty: {}".format(data_type, print("({}) Period data empty: {}".format(data_type,
period_seconds)) period_seconds))
period_data_average = 0 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) period_averages_dict[period_seconds] = zero_to_nan(period_data_average)