This is so confusing
This commit is contained in:
parent
2acf57d2e8
commit
59203a93a7
1 changed files with 4 additions and 2 deletions
|
@ -36,9 +36,11 @@ class Thermometer(BottomDial):
|
||||||
cr.set_line_width(6.0)
|
cr.set_line_width(6.0)
|
||||||
|
|
||||||
level = self.min_value
|
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:
|
if level >= self.WARN_VALUE:
|
||||||
cr.set_source_rgb(0.8, 0, 0)
|
cr.set_source_rgb(0.8, 0, 0)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue