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

Commit fd03d466 authored by Bryan Eyler's avatar Bryan Eyler
Browse files

Add a continuous property to default implementation.

Just a sample.  It's supposed to be ON_CHANGE as well, but that's a much
larger change.

Change-Id: Idd8c2a8346cb78efeae3d72bab5bd9d8f36cb5f2
parent bdd8532a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -114,6 +114,15 @@ const VehiclePropConfig kVehicleProperties[] = {
        }
    },

    {
        .prop = toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE),
        .access = VehiclePropertyAccess::READ,
        // TODO(bryaneyler): Support ON_CHANGE as well.
        .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
        .minSampleRate = 1.0f,
        .maxSampleRate = 2.0f,
    },

    {
        .prop = toInt(VehicleProperty::NIGHT_MODE),
        .access = VehiclePropertyAccess::READ,
+3 −0
Original line number Diff line number Diff line
@@ -537,6 +537,9 @@ void DefaultVehicleHal::setDefaultValue(VehiclePropValue* prop) {
    case toInt(VehicleProperty::HVAC_TEMPERATURE_SET):
        prop->value.floatValues[0] = 16;
        break;
    case toInt(VehicleProperty::ENV_OUTSIDE_TEMPERATURE):
        prop->value.floatValues[0] = 25;
        break;
    case toInt(VehicleProperty::NIGHT_MODE):
        prop->value.int32Values[0] = 0;
        break;