Less cursed??? :(
This commit is contained in:
parent
f8f12f6341
commit
6879e1f743
3 changed files with 6 additions and 6 deletions
|
@ -10,6 +10,8 @@ from hexagram.speedo import Speedo
|
|||
from hexagram.tacho import Tacho
|
||||
|
||||
class ShiftIndicator(Gauge):
|
||||
__slots__ = 'x', 'y', 'rpm_redline', 'rpm_max',
|
||||
|
||||
LIGHT_WIDTH = 48
|
||||
LIGHT_HEIGHT = 12
|
||||
LIGHT_SPACING = 8
|
||||
|
@ -31,8 +33,6 @@ class ShiftIndicator(Gauge):
|
|||
(4,),
|
||||
)
|
||||
|
||||
__slots__ = 'x', 'y', 'rpm_redline', 'rpm_max',
|
||||
|
||||
def __init__(self, x: float, y: float, rpm_redline: float, rpm_max: float):
|
||||
self.x = x
|
||||
self.y = y
|
||||
|
|
|
@ -9,13 +9,13 @@ class SpeedUnits(enum.Enum):
|
|||
MPH = 1
|
||||
|
||||
class Speedo(Dial):
|
||||
__slots__ = 'units',
|
||||
|
||||
MIN_ANGLE = 232.0 * (math.pi / 180.0)
|
||||
MAX_ANGLE = 488.0 * (math.pi / 180.0)
|
||||
|
||||
FONT_FACE = "Muli"
|
||||
|
||||
__slots__ = 'units',
|
||||
|
||||
def __init__(self, x: float, y: float, radius: float, max_value: float, units: SpeedUnits=SpeedUnits.KPH):
|
||||
super().__init__(x, y, radius, self.MIN_ANGLE, self.MAX_ANGLE, max_value)
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ import cairo
|
|||
from hexagram.dial import Dial
|
||||
|
||||
class Tacho(Dial):
|
||||
__slots__ = 'units',
|
||||
|
||||
MIN_ANGLE = 232.0 * (math.pi / 180.0)
|
||||
MAX_ANGLE = 488.0 * (math.pi / 180.0)
|
||||
|
||||
FONT_FACE = "Muli"
|
||||
|
||||
__slots__ = 'units',
|
||||
|
||||
def __init__(self, x: float, y: float, radius: float, max_value: float):
|
||||
super().__init__(x, y, radius, self.MIN_ANGLE, self.MAX_ANGLE, max_value)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue