From 1311a28e5946c3f26d12610687daddc66b97237b Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Thu, 4 Jan 2024 16:06:18 -0500 Subject: [PATCH] Reorder things a bit --- py/hexagram/icons.py | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/py/hexagram/icons.py b/py/hexagram/icons.py index 6c3af64..0c7017b 100644 --- a/py/hexagram/icons.py +++ b/py/hexagram/icons.py @@ -5,11 +5,11 @@ from hexagram.status import VehicleStatus from hexagram.svg import render_to_image class ISO7000Icon(): - __slots__ = 'name', 'status', 'color', + __slots__ = 'status', 'name', 'color', - def __init__(self, name: str, status: VehicleStatus, color: str): - self.name = name + def __init__(self, status: VehicleStatus, name: str, color: str): self.status = status + self.name = name self.color = color class ISO7000(): @@ -20,31 +20,31 @@ class ISO7000(): '/usr/share/hexagram/icons') __icons__ = ( - ('abs', VehicleStatus.ABS_FAULT, '#fa0'), - ('airbag', VehicleStatus.AIRBAG_FAULT, '#fa0'), - ('beams-fog', VehicleStatus.BATTERY_FAULT, '#f00'), - ('beams-fog', VehicleStatus.BEAMS_FOG, '#0f0'), - ('beams-high', VehicleStatus.BEAMS_HIGH, '#00f'), - ('beams-low', VehicleStatus.BEAMS_LOW, '#0f0'), - ('beams-parking', VehicleStatus.BEAMS_PARKING, '#ff0'), - ('belt', VehicleStatus.BELT, '#f00'), - ('caution', VehicleStatus.CAUTION, '#fa0'), - ('cold', VehicleStatus.COLD, '#eef'), - ('coolant', VehicleStatus.COLLISION, '#f00'), - ('coolant', VehicleStatus.COOLANT_LOW, '#fa0'), - ('coolant', VehicleStatus.COOLANT_OVERHEAT, '#f00'), - ('cruise', VehicleStatus.CRUISE, '#0f0'), - ('fuel', VehicleStatus.FUEL_LOW, '#fa0'), - ('lane-departure', VehicleStatus.LANEKEEP_OFF, '#fa0'), - ('mil', VehicleStatus.ENGINE_FAULT, '#fa0'), - ('oil', VehicleStatus.OIL_LOW, '#fa0'), - ('oil', VehicleStatus.OIL_OVERHEAT, '#f00'), - ('stability', VehicleStatus.STABILITY_OFF, '#fa0'), - ('tpms', VehicleStatus.TPMS_WARNING, '#f00'), - ('traction', VehicleStatus.TRACTION_OFF, '#fa0'), - ('traction', VehicleStatus.TRACTION_FAULT, '#f00'), - ('warning', VehicleStatus.WARNING, '#f00'), - ('wiper-washer', VehicleStatus.WIPER_WASHER_LOW, '#fa0'), + (VehicleStatus.ABS_FAULT, 'abs', '#fa0'), + (VehicleStatus.AIRBAG_FAULT, 'airbag', '#fa0'), + (VehicleStatus.BATTERY_FAULT, 'beams-fog', '#f00'), + (VehicleStatus.BEAMS_FOG, 'beams-fog', '#0f0'), + (VehicleStatus.BEAMS_HIGH, 'beams-high', '#00f'), + (VehicleStatus.BEAMS_LOW, 'beams-low', '#0f0'), + (VehicleStatus.BEAMS_PARKING, 'beams-parking', '#ff0'), + (VehicleStatus.BELT, 'belt', '#f00'), + (VehicleStatus.CAUTION, 'caution', '#fa0'), + (VehicleStatus.COLD, 'cold', '#eef'), + (VehicleStatus.COLLISION, 'coolant', '#f00'), + (VehicleStatus.COOLANT_LOW, 'coolant', '#fa0'), + (VehicleStatus.COOLANT_OVERHEAT, 'coolant', '#f00'), + (VehicleStatus.CRUISE, 'cruise', '#0f0'), + (VehicleStatus.FUEL_LOW, 'fuel', '#fa0'), + (VehicleStatus.LANEKEEP_OFF, 'lane-departure', '#fa0'), + (VehicleStatus.ENGINE_FAULT, 'mil', '#fa0'), + (VehicleStatus.OIL_LOW, 'oil', '#fa0'), + (VehicleStatus.OIL_OVERHEAT, 'oil', '#f00'), + (VehicleStatus.STABILITY_OFF, 'stability', '#fa0'), + (VehicleStatus.TPMS_WARNING, 'tpms', '#f00'), + (VehicleStatus.TRACTION_OFF, 'traction', '#fa0'), + (VehicleStatus.TRACTION_FAULT, 'traction', '#f00'), + (VehicleStatus.WARNING, 'warning', '#f00'), + (VehicleStatus.WIPER_WASHER_LOW, 'wiper-washer', '#fa0'), ) @staticmethod