From 1eb47240400aa9f949e6319b8eda17b0166abead Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 2 Jan 2024 13:45:58 -0500 Subject: [PATCH] Fixed that --- py/hexagram/thermo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py/hexagram/thermo.py b/py/hexagram/thermo.py index b479f94..51ab33f 100644 --- a/py/hexagram/thermo.py +++ b/py/hexagram/thermo.py @@ -61,10 +61,10 @@ class ThermoGauge(BottomDial): cr.set_line_width(6.0) - for level in range(0, self.MAX_VALUE - self.MIN_VALUE, math.ceil((self.MAX_VALUE - self.MIN_VALUE) / 9)): - if level + self.MIN_VALUE >= self.WARN_VALUE: + for level in range(self.min_value, self.max_value, math.ceil((self.max_value - self.min_value ) / 9)): + if level >= self.WARN_VALUE: cr.set_source_rgb(0.8, 0, 0) else: cr.set_source_rgb(1, 1, 1) - self.draw_mark(cr, 0.83, 0.87, self.max_value - level) + self.draw_mark(cr, 0.83, 0.87, level)