From 59203a93a7592cad0f2b7ee04d0bd4728d01f16c Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 8 Jan 2024 23:08:46 -0500 Subject: [PATCH] This is so confusing --- py/hexagram/thermo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/py/hexagram/thermo.py b/py/hexagram/thermo.py index ea5f1f3..82e2259 100644 --- a/py/hexagram/thermo.py +++ b/py/hexagram/thermo.py @@ -36,9 +36,11 @@ class Thermometer(BottomDial): cr.set_line_width(6.0) level = self.min_value - incr = math.ceil((self.max_value - self.min_value) / 9.0) + incr = (self.max_value - self.min_value) / 9.0 + + for i in range(0, 9): + level = self.min_value + i * incr - while level <= self.max_value: if level >= self.WARN_VALUE: cr.set_source_rgb(0.8, 0, 0) else: