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

Commit 54fbe318 authored by Grace Cheng's avatar Grace Cheng Committed by Android (Google) Code Review
Browse files

Merge "Fixes vts failure. Formats code."

parents 362239fa 7dc09889
Loading
Loading
Loading
Loading
+682 −645
Original line number Diff line number Diff line
@@ -261,6 +261,8 @@ const ConfigDeclaration kVehicleProperties[]{
                         .prop = toInt(VehicleProperty::PERF_ODOMETER),
                         .access = VehiclePropertyAccess::READ,
                         .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
                         .minSampleRate = 0.0f,
                         .maxSampleRate = 10.0f,
                 },
         .initialValue = {.floatValues = {0.0f}}},

@@ -281,6 +283,8 @@ const ConfigDeclaration kVehicleProperties[]{
                         .prop = toInt(VehicleProperty::FUEL_LEVEL),
                         .access = VehiclePropertyAccess::READ,
                         .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
                         .minSampleRate = 0.0f,
                         .maxSampleRate = 100.0f,
                 },
         .initialValue = {.floatValues = {15000.0f}}},

@@ -297,6 +301,8 @@ const ConfigDeclaration kVehicleProperties[]{
                         .prop = toInt(VehicleProperty::EV_BATTERY_LEVEL),
                         .access = VehiclePropertyAccess::READ,
                         .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
                         .minSampleRate = 0.0f,
                         .maxSampleRate = 100.0f,
                 },
         .initialValue = {.floatValues = {150000.0f}}},

@@ -321,6 +327,8 @@ const ConfigDeclaration kVehicleProperties[]{
                         .prop = toInt(VehicleProperty::EV_BATTERY_INSTANTANEOUS_CHARGE_RATE),
                         .access = VehiclePropertyAccess::READ,
                         .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
                         .minSampleRate = 1.0f,
                         .maxSampleRate = 10.0f,
                 },
         .initialValue = {.floatValues = {0.0f}}},

@@ -334,24 +342,30 @@ const ConfigDeclaration kVehicleProperties[]{
                 },
         .initialValue = {.floatValues = {100.0f}}},  // units in meters

    {.config =
         {.prop = toInt(VehicleProperty::TIRE_PRESSURE),
        {.config = {.prop = toInt(VehicleProperty::TIRE_PRESSURE),
                    .access = VehiclePropertyAccess::READ,
                    .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
                    .minSampleRate = 1.0f,
                    .maxSampleRate = 2.0f,
          .areaConfigs =
              {VehicleAreaConfig{
                   .areaId = WHEEL_FRONT_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f,
                    .areaConfigs = {VehicleAreaConfig{
                                            .areaId = WHEEL_FRONT_LEFT,
                                            .minFloatValue = 100.0f,
                                            .maxFloatValue = 300.0f,
                                    },
                                    VehicleAreaConfig{
                   .areaId = WHEEL_FRONT_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f,
                                            .areaId = WHEEL_FRONT_RIGHT,
                                            .minFloatValue = 100.0f,
                                            .maxFloatValue = 300.0f,
                                    },
                                    VehicleAreaConfig{
                   .areaId = WHEEL_REAR_LEFT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f,
                                            .areaId = WHEEL_REAR_LEFT,
                                            .minFloatValue = 100.0f,
                                            .maxFloatValue = 300.0f,
                                    },
                                    VehicleAreaConfig{
                   .areaId = WHEEL_REAR_RIGHT, .minFloatValue = 100.0f, .maxFloatValue = 300.0f,
                                            .areaId = WHEEL_REAR_RIGHT,
                                            .minFloatValue = 100.0f,
                                            .maxFloatValue = 300.0f,
                                    }}},
         .initialValue = {.floatValues = {200.0f}}},  // units in kPa

@@ -402,8 +416,10 @@ const ConfigDeclaration kVehicleProperties[]{
                           .access = VehiclePropertyAccess::READ_WRITE,
                           .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                           .areaConfigs =
                       {VehicleAreaConfig{.areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)},
                        VehicleAreaConfig{.areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}},
                                   {VehicleAreaConfig{
                                            .areaId = toInt(VehicleAreaWindow::FRONT_WINDSHIELD)},
                                    VehicleAreaConfig{
                                            .areaId = toInt(VehicleAreaWindow::REAR_WINDSHIELD)}}},
                .initialValue = {.int32Values = {0}}  // Will be used for all areas.
        },

@@ -473,12 +489,17 @@ const ConfigDeclaration kVehicleProperties[]{
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                    .areaConfigs = {VehicleAreaConfig{
                                    .areaId = SEAT_1_LEFT, .minInt32Value = 0, .maxInt32Value = 3,
                                            .areaId = SEAT_1_LEFT,
                                            .minInt32Value = 0,
                                            .maxInt32Value = 3,
                                    },
                                    VehicleAreaConfig{
                                    .areaId = SEAT_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 3,
                                            .areaId = SEAT_1_RIGHT,
                                            .minInt32Value = 0,
                                            .maxInt32Value = 3,
                                    }}},
     .initialValue = {.int32Values = {0}}},  // 0 is off and +ve values indicate ventilation level.
         .initialValue =
                 {.int32Values = {0}}},  // 0 is off and +ve values indicate ventilation level.

        {.config = {.prop = toInt(VehicleProperty::HVAC_STEERING_WHEEL_HEAT),
                    .access = VehiclePropertyAccess::READ_WRITE,
@@ -491,10 +512,14 @@ const ConfigDeclaration kVehicleProperties[]{
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                    .areaConfigs = {VehicleAreaConfig{
                                    .areaId = SEAT_1_LEFT, .minInt32Value = -2, .maxInt32Value = 2,
                                            .areaId = SEAT_1_LEFT,
                                            .minInt32Value = -2,
                                            .maxInt32Value = 2,
                                    },
                                    VehicleAreaConfig{
                                    .areaId = SEAT_1_RIGHT, .minInt32Value = -2, .maxInt32Value = 2,
                                            .areaId = SEAT_1_RIGHT,
                                            .minInt32Value = -2,
                                            .maxInt32Value = 2,
                                    }}},
         .initialValue = {.int32Values = {0}}},  // +ve values for heating and -ve for cooling

@@ -528,8 +553,7 @@ const ConfigDeclaration kVehicleProperties[]{
        {.config = {.prop = toInt(VehicleProperty::HVAC_TEMPERATURE_DISPLAY_UNITS),
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                .configArray = {(int)VehicleUnit::FAHRENHEIT, (int)VehicleUnit::CELSIUS}
               },
                    .configArray = {(int)VehicleUnit::FAHRENHEIT, (int)VehicleUnit::CELSIUS}},
         .initialValue = {.int32Values = {(int)VehicleUnit::FAHRENHEIT}}},

        {.config =
@@ -595,17 +619,22 @@ const ConfigDeclaration kVehicleProperties[]{
                               {DOOR_2_LEFT, {.int32Values = {1}}},
                               {DOOR_2_RIGHT, {.int32Values = {1}}}}},

    {.config =
         {
             .prop = toInt(VehicleProperty::DOOR_POS),
        {.config = {.prop = toInt(VehicleProperty::DOOR_POS),
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                    .areaConfigs =
                 {VehicleAreaConfig{.areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1},
                  VehicleAreaConfig{.areaId = DOOR_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 1},
                  VehicleAreaConfig{.areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1},
                  VehicleAreaConfig{.areaId = DOOR_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 1},
                  VehicleAreaConfig{.areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}},
                            {VehicleAreaConfig{
                                     .areaId = DOOR_1_LEFT, .minInt32Value = 0, .maxInt32Value = 1},
                             VehicleAreaConfig{.areaId = DOOR_1_RIGHT,
                                               .minInt32Value = 0,
                                               .maxInt32Value = 1},
                             VehicleAreaConfig{
                                     .areaId = DOOR_2_LEFT, .minInt32Value = 0, .maxInt32Value = 1},
                             VehicleAreaConfig{.areaId = DOOR_2_RIGHT,
                                               .minInt32Value = 0,
                                               .maxInt32Value = 1},
                             VehicleAreaConfig{
                                     .areaId = DOOR_REAR, .minInt32Value = 0, .maxInt32Value = 1}}},
         .initialValue = {.int32Values = {0}}},

        {.config = {.prop = toInt(VehicleProperty::WINDOW_LOCK),
@@ -616,18 +645,24 @@ const ConfigDeclaration kVehicleProperties[]{
         .initialAreaValues = {{WINDOW_1_RIGHT | WINDOW_2_LEFT | WINDOW_2_RIGHT,
                                {.int32Values = {0}}}}},

    {.config =
         {.prop = toInt(VehicleProperty::WINDOW_POS),
          .access =
              VehiclePropertyAccess::READ_WRITE,
          .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
          .areaConfigs =
              {VehicleAreaConfig{.areaId = WINDOW_1_LEFT, .minInt32Value = 0, .maxInt32Value = 10},
               VehicleAreaConfig{.areaId = WINDOW_1_RIGHT, .minInt32Value = 0, .maxInt32Value = 10},
               VehicleAreaConfig{.areaId = WINDOW_2_LEFT, .minInt32Value = 0, .maxInt32Value = 10},
               VehicleAreaConfig{.areaId = WINDOW_2_RIGHT, .minInt32Value = 0, .maxInt32Value = 10},
               VehicleAreaConfig{
                   .areaId = WINDOW_ROOF_TOP_1, .minInt32Value = -10, .maxInt32Value = 10}}},
        {.config = {.prop = toInt(VehicleProperty::WINDOW_POS),
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                    .areaConfigs = {VehicleAreaConfig{.areaId = WINDOW_1_LEFT,
                                                      .minInt32Value = 0,
                                                      .maxInt32Value = 10},
                                    VehicleAreaConfig{.areaId = WINDOW_1_RIGHT,
                                                      .minInt32Value = 0,
                                                      .maxInt32Value = 10},
                                    VehicleAreaConfig{.areaId = WINDOW_2_LEFT,
                                                      .minInt32Value = 0,
                                                      .maxInt32Value = 10},
                                    VehicleAreaConfig{.areaId = WINDOW_2_RIGHT,
                                                      .minInt32Value = 0,
                                                      .maxInt32Value = 10},
                                    VehicleAreaConfig{.areaId = WINDOW_ROOF_TOP_1,
                                                      .minInt32Value = -10,
                                                      .maxInt32Value = 10}}},
         .initialValue = {.int32Values = {0}}},

        {.config =
@@ -779,18 +814,20 @@ const ConfigDeclaration kVehicleProperties[]{
        {.config = {.prop = VENDOR_EXTENSION_FLOAT_PROPERTY,
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                .areaConfigs = {VehicleAreaConfig{
                                    .areaId = HVAC_LEFT, .minFloatValue = -10, .maxFloatValue = 10},
                    .areaConfigs = {VehicleAreaConfig{.areaId = HVAC_LEFT,
                                                      .minFloatValue = -10,
                                                      .maxFloatValue = 10},
                                    VehicleAreaConfig{.areaId = HVAC_RIGHT,
                                                      .minFloatValue = -10,
                                                      .maxFloatValue = 10}}},
     .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}}, {HVAC_RIGHT, {.floatValues = {2}}}}},
         .initialAreaValues = {{HVAC_LEFT, {.floatValues = {1}}},
                               {HVAC_RIGHT, {.floatValues = {2}}}}},

        {.config = {.prop = VENDOR_EXTENSION_INT_PROPERTY,
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                .areaConfigs = {VehicleAreaConfig{
                                    .areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD,
                    .areaConfigs =
                            {VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::FRONT_WINDSHIELD,
                                               .minInt32Value = -100,
                                               .maxInt32Value = 100},
                             VehicleAreaConfig{.areaId = (int)VehicleAreaWindow::REAR_WINDSHIELD,