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
|
from hexagram.tacho import Tacho
|
||||||
|
|
||||||
class ShiftIndicator(Gauge):
|
class ShiftIndicator(Gauge):
|
||||||
|
__slots__ = 'x', 'y', 'rpm_redline', 'rpm_max',
|
||||||
|
|
||||||
LIGHT_WIDTH = 48
|
LIGHT_WIDTH = 48
|
||||||
LIGHT_HEIGHT = 12
|
LIGHT_HEIGHT = 12
|
||||||
LIGHT_SPACING = 8
|
LIGHT_SPACING = 8
|
||||||
|
@ -31,8 +33,6 @@ class ShiftIndicator(Gauge):
|
||||||
(4,),
|
(4,),
|
||||||
)
|
)
|
||||||
|
|
||||||
__slots__ = 'x', 'y', 'rpm_redline', 'rpm_max',
|
|
||||||
|
|
||||||
def __init__(self, x: float, y: float, rpm_redline: float, rpm_max: float):
|
def __init__(self, x: float, y: float, rpm_redline: float, rpm_max: float):
|
||||||
self.x = x
|
self.x = x
|
||||||
self.y = y
|
self.y = y
|
||||||
|
|
|
@ -9,13 +9,13 @@ class SpeedUnits(enum.Enum):
|
||||||
MPH = 1
|
MPH = 1
|
||||||
|
|
||||||
class Speedo(Dial):
|
class Speedo(Dial):
|
||||||
|
__slots__ = 'units',
|
||||||
|
|
||||||
MIN_ANGLE = 232.0 * (math.pi / 180.0)
|
MIN_ANGLE = 232.0 * (math.pi / 180.0)
|
||||||
MAX_ANGLE = 488.0 * (math.pi / 180.0)
|
MAX_ANGLE = 488.0 * (math.pi / 180.0)
|
||||||
|
|
||||||
FONT_FACE = "Muli"
|
FONT_FACE = "Muli"
|
||||||
|
|
||||||
__slots__ = 'units',
|
|
||||||
|
|
||||||
def __init__(self, x: float, y: float, radius: float, max_value: float, units: SpeedUnits=SpeedUnits.KPH):
|
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)
|
super().__init__(x, y, radius, self.MIN_ANGLE, self.MAX_ANGLE, max_value)
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,13 @@ import cairo
|
||||||
from hexagram.dial import Dial
|
from hexagram.dial import Dial
|
||||||
|
|
||||||
class Tacho(Dial):
|
class Tacho(Dial):
|
||||||
|
__slots__ = 'units',
|
||||||
|
|
||||||
MIN_ANGLE = 232.0 * (math.pi / 180.0)
|
MIN_ANGLE = 232.0 * (math.pi / 180.0)
|
||||||
MAX_ANGLE = 488.0 * (math.pi / 180.0)
|
MAX_ANGLE = 488.0 * (math.pi / 180.0)
|
||||||
|
|
||||||
FONT_FACE = "Muli"
|
FONT_FACE = "Muli"
|
||||||
|
|
||||||
__slots__ = 'units',
|
|
||||||
|
|
||||||
def __init__(self, x: float, y: float, radius: float, max_value: float):
|
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)
|
super().__init__(x, y, radius, self.MIN_ANGLE, self.MAX_ANGLE, max_value)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue