From d6ec45b151616b0a89aac39bcfe8b5906fad09f1 Mon Sep 17 00:00:00 2001 From: William Brannon Date: Tue, 31 Oct 2023 08:14:17 -0600 Subject: [PATCH 1/2] Add new entries to `VehicleModel` --- python/fusion_engine_client/messages/configuration.py | 7 ++++++- src/point_one/fusion_engine/messages/configuration.h | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/python/fusion_engine_client/messages/configuration.py b/python/fusion_engine_client/messages/configuration.py index a8d4efee..8c73aebd 100644 --- a/python/fusion_engine_client/messages/configuration.py +++ b/python/fusion_engine_client/messages/configuration.py @@ -105,7 +105,12 @@ class VehicleModel(IntEnum): LINCOLN_MKZ = 180, - BMW_7 = 200 + BMW_7 = 200, + BMW_MOTORRAD = 201, + + VW_4 = 220, + + RIVIAN = 240 class WheelSensorType(IntEnum): diff --git a/src/point_one/fusion_engine/messages/configuration.h b/src/point_one/fusion_engine/messages/configuration.h index b5bd5bb6..f6f8c758 100644 --- a/src/point_one/fusion_engine/messages/configuration.h +++ b/src/point_one/fusion_engine/messages/configuration.h @@ -773,6 +773,11 @@ enum class VehicleModel : uint16_t { LINCOLN_MKZ = 180, BMW_7 = 200, + BMW_MOTORRAD = 201, + + VW_4 = 220, + + RIVIAN = 240, }; /** @@ -817,6 +822,12 @@ P1_CONSTEXPR_FUNC const char* to_string(VehicleModel vehicle_model) { return "LINCOLN_MKZ"; case VehicleModel::BMW_7: return "BMW_7"; + case VehicleModel::BMW_MOTORRAD: + return "BMW_MOTORRAD"; + case VehicleModel::VW_4: + return "VW_4"; + case VehicleModel::RIVIAN: + return "RIVIAN"; default: return "UNRECOGNIZED"; } From 41d8694e1858dcbf373528e91d07da8f68c7b984 Mon Sep 17 00:00:00 2001 From: William Brannon Date: Wed, 1 Nov 2023 10:19:19 -0600 Subject: [PATCH 2/2] Remove commas from class --- .../messages/configuration.py | 98 +++++++++---------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/python/fusion_engine_client/messages/configuration.py b/python/fusion_engine_client/messages/configuration.py index 8c73aebd..1c1acad6 100644 --- a/python/fusion_engine_client/messages/configuration.py +++ b/python/fusion_engine_client/messages/configuration.py @@ -56,24 +56,24 @@ class InterfaceConfigType(IntEnum): class Direction(IntEnum): ## Aligned with vehicle +x axis. - FORWARD = 0, + FORWARD = 0 ## Aligned with vehicle -x axis. - BACKWARD = 1, + BACKWARD = 1 ## Aligned with vehicle +y axis. - LEFT = 2, + LEFT = 2 ## Aligned with vehicle -y axis. - RIGHT = 3, + RIGHT = 3 ## Aligned with vehicle +z axis. - UP = 4, + UP = 4 ## Aligned with vehicle -z axis. - DOWN = 5, + DOWN = 5 ## Error value. INVALID = 255 class VehicleModel(IntEnum): - UNKNOWN_VEHICLE = 0, - DATASPEED_CD4 = 1, + UNKNOWN_VEHICLE = 0 + DATASPEED_CD4 = 1 ## In general, all J1939 vehicles support a subset of the J1939 standard and ## may be set to vehicle model `J1939`. Their 29-bit CAN IDs may differ ## based on how the platform assigns message priorities and source @@ -82,85 +82,85 @@ class VehicleModel(IntEnum): ## ## For most vehicles, it is not necessary to specify and particular make and ## model. - J1939 = 2, + J1939 = 2 - LEXUS_CT200H = 20, + LEXUS_CT200H = 20 - KIA_SORENTO = 40, - KIA_SPORTAGE = 41, + KIA_SORENTO = 40 + KIA_SPORTAGE = 41 - AUDI_Q7 = 60, - AUDI_A8L = 61, + AUDI_Q7 = 60 + AUDI_A8L = 61 - TESLA_MODEL_X = 80, - TESLA_MODEL_3 = 81, + TESLA_MODEL_X = 80 + TESLA_MODEL_3 = 81 - HYUNDAI_ELANTRA = 100, + HYUNDAI_ELANTRA = 100 - PEUGEOT_206 = 120, + PEUGEOT_206 = 120 - MAN_TGX = 140, + MAN_TGX = 140 - FACTION = 160, + FACTION = 160 - LINCOLN_MKZ = 180, + LINCOLN_MKZ = 180 - BMW_7 = 200, - BMW_MOTORRAD = 201, + BMW_7 = 200 + BMW_MOTORRAD = 201 - VW_4 = 220, + VW_4 = 220 RIVIAN = 240 class WheelSensorType(IntEnum): - NONE = 0, - # RESERVED = 1, - TICKS = 2, - WHEEL_SPEED = 3, - VEHICLE_SPEED = 4, + NONE = 0 + # RESERVED = 1 + TICKS = 2 + WHEEL_SPEED = 3 + VEHICLE_SPEED = 4 VEHICLE_TICKS = 5 class AppliedSpeedType(IntEnum): - NONE = 0, - REAR_WHEELS = 1, - FRONT_WHEELS = 2, - FRONT_AND_REAR_WHEELS = 3, + NONE = 0 + REAR_WHEELS = 1 + FRONT_WHEELS = 2 + FRONT_AND_REAR_WHEELS = 3 VEHICLE_BODY = 4 class SteeringType(IntEnum): - UNKNOWN = 0, - FRONT = 1, + UNKNOWN = 0 + FRONT = 1 FRONT_AND_REAR = 2 class TickMode(IntEnum): - OFF = 0, - RISING_EDGE = 1, + OFF = 0 + RISING_EDGE = 1 FALLING_EDGE = 2 class TickDirection(IntEnum): - OFF = 0, - FORWARD_ACTIVE_HIGH = 1, + OFF = 0 + FORWARD_ACTIVE_HIGH = 1 FORWARD_ACTIVE_LOW = 2 class TransportType(IntEnum): - INVALID = 0, - SERIAL = 1, - FILE = 2, - TCP_CLIENT = 3, - TCP_SERVER = 4, - UDP_CLIENT = 5, - UDP_SERVER = 6, - WEBSOCKET_SERVER = 7, + INVALID = 0 + SERIAL = 1 + FILE = 2 + TCP_CLIENT = 3 + TCP_SERVER = 4 + UDP_CLIENT = 5 + UDP_SERVER = 6 + WEBSOCKET_SERVER = 7 ## Set/get the configuration for the interface on which the command was received. - CURRENT = 254, + CURRENT = 254 ## Set/get the configuration for the all I/O interfaces. - ALL = 255, + ALL = 255 class UpdateAction(IntEnum):