Reorder things a bit

This commit is contained in:
XANTRONIX Development 2024-01-04 16:06:18 -05:00
parent 1bb12ea4fa
commit 1311a28e59

View file

@ -5,11 +5,11 @@ from hexagram.status import VehicleStatus
from hexagram.svg import render_to_image from hexagram.svg import render_to_image
class ISO7000Icon(): class ISO7000Icon():
__slots__ = 'name', 'status', 'color', __slots__ = 'status', 'name', 'color',
def __init__(self, name: str, status: VehicleStatus, color: str): def __init__(self, status: VehicleStatus, name: str, color: str):
self.name = name
self.status = status self.status = status
self.name = name
self.color = color self.color = color
class ISO7000(): class ISO7000():
@ -20,31 +20,31 @@ class ISO7000():
'/usr/share/hexagram/icons') '/usr/share/hexagram/icons')
__icons__ = ( __icons__ = (
('abs', VehicleStatus.ABS_FAULT, '#fa0'), (VehicleStatus.ABS_FAULT, 'abs', '#fa0'),
('airbag', VehicleStatus.AIRBAG_FAULT, '#fa0'), (VehicleStatus.AIRBAG_FAULT, 'airbag', '#fa0'),
('beams-fog', VehicleStatus.BATTERY_FAULT, '#f00'), (VehicleStatus.BATTERY_FAULT, 'beams-fog', '#f00'),
('beams-fog', VehicleStatus.BEAMS_FOG, '#0f0'), (VehicleStatus.BEAMS_FOG, 'beams-fog', '#0f0'),
('beams-high', VehicleStatus.BEAMS_HIGH, '#00f'), (VehicleStatus.BEAMS_HIGH, 'beams-high', '#00f'),
('beams-low', VehicleStatus.BEAMS_LOW, '#0f0'), (VehicleStatus.BEAMS_LOW, 'beams-low', '#0f0'),
('beams-parking', VehicleStatus.BEAMS_PARKING, '#ff0'), (VehicleStatus.BEAMS_PARKING, 'beams-parking', '#ff0'),
('belt', VehicleStatus.BELT, '#f00'), (VehicleStatus.BELT, 'belt', '#f00'),
('caution', VehicleStatus.CAUTION, '#fa0'), (VehicleStatus.CAUTION, 'caution', '#fa0'),
('cold', VehicleStatus.COLD, '#eef'), (VehicleStatus.COLD, 'cold', '#eef'),
('coolant', VehicleStatus.COLLISION, '#f00'), (VehicleStatus.COLLISION, 'coolant', '#f00'),
('coolant', VehicleStatus.COOLANT_LOW, '#fa0'), (VehicleStatus.COOLANT_LOW, 'coolant', '#fa0'),
('coolant', VehicleStatus.COOLANT_OVERHEAT, '#f00'), (VehicleStatus.COOLANT_OVERHEAT, 'coolant', '#f00'),
('cruise', VehicleStatus.CRUISE, '#0f0'), (VehicleStatus.CRUISE, 'cruise', '#0f0'),
('fuel', VehicleStatus.FUEL_LOW, '#fa0'), (VehicleStatus.FUEL_LOW, 'fuel', '#fa0'),
('lane-departure', VehicleStatus.LANEKEEP_OFF, '#fa0'), (VehicleStatus.LANEKEEP_OFF, 'lane-departure', '#fa0'),
('mil', VehicleStatus.ENGINE_FAULT, '#fa0'), (VehicleStatus.ENGINE_FAULT, 'mil', '#fa0'),
('oil', VehicleStatus.OIL_LOW, '#fa0'), (VehicleStatus.OIL_LOW, 'oil', '#fa0'),
('oil', VehicleStatus.OIL_OVERHEAT, '#f00'), (VehicleStatus.OIL_OVERHEAT, 'oil', '#f00'),
('stability', VehicleStatus.STABILITY_OFF, '#fa0'), (VehicleStatus.STABILITY_OFF, 'stability', '#fa0'),
('tpms', VehicleStatus.TPMS_WARNING, '#f00'), (VehicleStatus.TPMS_WARNING, 'tpms', '#f00'),
('traction', VehicleStatus.TRACTION_OFF, '#fa0'), (VehicleStatus.TRACTION_OFF, 'traction', '#fa0'),
('traction', VehicleStatus.TRACTION_FAULT, '#f00'), (VehicleStatus.TRACTION_FAULT, 'traction', '#f00'),
('warning', VehicleStatus.WARNING, '#f00'), (VehicleStatus.WARNING, 'warning', '#f00'),
('wiper-washer', VehicleStatus.WIPER_WASHER_LOW, '#fa0'), (VehicleStatus.WIPER_WASHER_LOW, 'wiper-washer', '#fa0'),
) )
@staticmethod @staticmethod