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

Commit 21999ff4 authored by Aaqib Ismail's avatar Aaqib Ismail
Browse files

Change HVAC_MAX_DEFROST_ON to front and back row area IDs

This helps standardize commands sent by Assistant for using the
defroster.

Bug: 323101580
Test: m
Change-Id: I006ca7fc779e011a3d3be8cac95fe34a3567d4b2
parent 300b9263
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -449,7 +449,8 @@ const ConfigDeclaration kVehicleProperties[]{
        {.config = {.prop = toInt(VehicleProperty::HVAC_MAX_DEFROST_ON),
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                    .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_ALL}}},
                    .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_FRONT_ROW},
                                    VehicleAreaConfig{.areaId = HVAC_REAR_ROW}}},
         .initialValue = {.int32Values = {0}}},

        {.config = {.prop = toInt(VehicleProperty::HVAC_RECIRC_ON),
+3 −0
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@ constexpr int ALL_WHEELS =
          VehicleAreaWheel::LEFT_REAR | VehicleAreaWheel::RIGHT_REAR);
constexpr int SEAT_1_LEFT = (int)(VehicleAreaSeat::ROW_1_LEFT);
constexpr int SEAT_1_RIGHT = (int)(VehicleAreaSeat::ROW_1_RIGHT);
constexpr int HVAC_FRONT_ROW = (int)(VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_1_RIGHT);
constexpr int HVAC_REAR_ROW = (int)(VehicleAreaSeat::ROW_2_LEFT | VehicleAreaSeat::ROW_2_CENTER |
                                    VehicleAreaSeat::ROW_2_RIGHT);
constexpr int HVAC_LEFT = (int)(VehicleAreaSeat::ROW_1_LEFT | VehicleAreaSeat::ROW_2_LEFT |
                                VehicleAreaSeat::ROW_2_CENTER);
constexpr int HVAC_RIGHT = (int)(VehicleAreaSeat::ROW_1_RIGHT | VehicleAreaSeat::ROW_2_RIGHT);
+2 −0
Original line number Diff line number Diff line
@@ -104,6 +104,8 @@ const std::unordered_map<std::string, int> CONSTANTS_BY_NAME = {
        {"HVAC_ALL", HVAC_ALL},
        {"HVAC_LEFT", HVAC_LEFT},
        {"HVAC_RIGHT", HVAC_RIGHT},
        {"HVAC_FRONT_ROW", HVAC_FRONT_ROW},
        {"HVAC_REAR_ROW", HVAC_REAR_ROW},
        {"WINDOW_1_LEFT", WINDOW_1_LEFT},
        {"WINDOW_1_RIGHT", WINDOW_1_RIGHT},
        {"WINDOW_2_LEFT", WINDOW_2_LEFT},
+2 −11
Original line number Diff line number Diff line
@@ -2033,19 +2033,10 @@
            },
            "areas": [
                {
                    "areaId": "Constants::SEAT_1_LEFT"
                },
                {
                    "areaId": "Constants::SEAT_1_RIGHT"
                    "areaId": "Constants::HVAC_FRONT_ROW"
                },
                {
                    "areaId": "Constants::SEAT_2_LEFT"
                },
                {
                    "areaId": "Constants::SEAT_2_RIGHT"
                },
                {
                    "areaId": "Constants::SEAT_2_CENTER"
                    "areaId": "Constants::HVAC_REAR_ROW"
                }
            ]
        },
+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@ constexpr int ALL_WHEELS =
constexpr int HVAC_LEFT = SEAT_1_LEFT | SEAT_2_LEFT | SEAT_2_CENTER;
constexpr int HVAC_RIGHT = SEAT_1_RIGHT | SEAT_2_RIGHT;
constexpr int HVAC_ALL = HVAC_LEFT | HVAC_RIGHT;
constexpr int HVAC_FRONT_ROW = SEAT_1_LEFT | SEAT_1_RIGHT;
constexpr int HVAC_REAR_ROW = SEAT_2_LEFT | SEAT_2_CENTER | SEAT_2_RIGHT;

}  // namespace vehicle
}  // namespace automotive