Fixed global empty_weight
This commit is contained in:
parent
a723ccf2f8
commit
49c641cb46
1 changed files with 1 additions and 1 deletions
|
@ -82,6 +82,7 @@ def check_for_change():
|
||||||
return
|
return
|
||||||
|
|
||||||
global show_scale_countdown
|
global show_scale_countdown
|
||||||
|
global empty_weight
|
||||||
latest = local_history[-1]
|
latest = local_history[-1]
|
||||||
if show_scale_countdown > 0 and show_scale_countdown % 3 == 0:
|
if show_scale_countdown > 0 and show_scale_countdown % 3 == 0:
|
||||||
show_scale(latest["total"] - empty_weight)
|
show_scale(latest["total"] - empty_weight)
|
||||||
|
@ -96,7 +97,6 @@ def check_for_change():
|
||||||
weight_increased = delta > 0
|
weight_increased = delta > 0
|
||||||
|
|
||||||
# Make sure there is a bed_weight
|
# Make sure there is a bed_weight
|
||||||
global empty_weight
|
|
||||||
if empty_weight is None:
|
if empty_weight is None:
|
||||||
clusters = get_clusters(
|
clusters = get_clusters(
|
||||||
[d["total"] for d in local_history], min_noticable_difference
|
[d["total"] for d in local_history], min_noticable_difference
|
||||||
|
|
Loading…
Reference in a new issue