Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 653916fb authored by Kai Wang's avatar Kai Wang Committed by Android (Google) Code Review
Browse files

Merge "Add property for multiple ev port locations"

parents b141a239 d0bc0bc5
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ constexpr int VENDOR_EXTENSION_STRING_PROPERTY =
    (int)(0x104 | VehiclePropertyGroup::VENDOR | VehiclePropertyType::STRING | VehicleArea::GLOBAL);
constexpr int FUEL_DOOR_REAR_LEFT = (int)PortLocationType::REAR_LEFT;
constexpr int CHARGE_PORT_FRONT_LEFT = (int)PortLocationType::FRONT_LEFT;
constexpr int CHARGE_PORT_REAR_LEFT = (int)PortLocationType::REAR_LEFT;
constexpr int LIGHT_STATE_ON = (int)VehicleLightState::ON;
constexpr int LIGHT_SWITCH_AUTO = (int)VehicleLightSwitch::AUTOMATIC;
constexpr int WHEEL_FRONT_LEFT = (int)VehicleAreaWheel::LEFT_FRONT;
@@ -247,6 +248,14 @@ const ConfigDeclaration kVehicleProperties[]{
                 },
         .initialValue = {.int32Values = {CHARGE_PORT_FRONT_LEFT}}},

        {.config =
                 {
                         .prop = toInt(VehicleProperty::INFO_MULTI_EV_PORT_LOCATIONS),
                         .access = VehiclePropertyAccess::READ,
                         .changeMode = VehiclePropertyChangeMode::STATIC,
                 },
         .initialValue = {.int32Values = {CHARGE_PORT_FRONT_LEFT, CHARGE_PORT_REAR_LEFT}}},

        {.config =
                 {
                         .prop = toInt(VehicleProperty::INFO_MAKE),
+19 −0
Original line number Diff line number Diff line
@@ -319,6 +319,25 @@ enum VehicleProperty : int32_t {
        | VehiclePropertyType:INT32_VEC
        | VehicleArea:GLOBAL),

    /**
     * Multiple EV port locations
     *
     * Implement this property if the vehicle has multiple EV ports.
     * Port locations are defined in PortLocationType.
     * For example, a car has one port in front left and one port in rear left:
     *   int32Values[0] = PortLocationType::FRONT_LEFT
     *   int32Values[0] = PortLocationType::REAR_LEFT
     *
     * @change_mode VehiclePropertyChangeMode:STATIC
     * @access VehiclePropertyAccess:READ
     * @data_enum PortLocationType
     */
    INFO_MULTI_EV_PORT_LOCATIONS = (
        0x010C
        | VehiclePropertyGroup:SYSTEM
        | VehiclePropertyType:INT32_VEC
        | VehicleArea:GLOBAL),

    /**
     * Current odometer value of the vehicle
     *