diff --git a/py/hexagram/cluster.py b/py/hexagram/cluster.py index 84d52af..ea975fb 100644 --- a/py/hexagram/cluster.py +++ b/py/hexagram/cluster.py @@ -70,12 +70,13 @@ class ShiftIndicator(Gauge): (4,), ) - __slots__ = 'x', 'y', 'redline', + __slots__ = 'x', 'y', 'rpm_redline', 'rpm_max', - def __init__(self, x: float, y: float, redline: float): - self.x = x - self.y = y - self.redline = redline + def __init__(self, x: float, y: float, rpm_redline: float, rpm_max: float): + self.x = x + self.y = y + self.rpm_redline = rpm_redline + self.rpm_max = rpm_max def draw_bg(self, cr: cairo.Context): for level in range(0, len(self.LIGHT_LEVELS)): @@ -104,7 +105,7 @@ class Cluster(): __slots__ = 'gauges', - def __init__(self, redline: float): + def __init__(self, rpm_redline: float, rpm_max: float): self.gauges = list() for x in (self.HEIGHT / 2, self.WIDTH - self.HEIGHT / 2): @@ -112,7 +113,8 @@ class Cluster(): self.gauges.append(ShiftIndicator(self.SHIFT_INDICATOR_X, self.SHIFT_INDICATOR_Y, - redline)) + rpm_redline, + rpm_max)) def draw_bg(self, cr: cairo.Context): cr.set_source_rgb(0, 0, 0)