blob: 12c1c1bb4c5d1feb15f3e35b1ad09fdb1e67cb4d [file] [log] [blame]
Pavel Maltseve2603e32016-10-25 16:03:23 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef android_hardware_vehicle_V2_0_impl_DefaultConfig_H_
18#define android_hardware_vehicle_V2_0_impl_DefaultConfig_H_
19
20#include <android/hardware/vehicle/2.0/IVehicle.h>
Pavel Maltsev30c84c32016-11-14 16:23:36 -080021#include <vehicle_hal_manager/VehicleUtils.h>
Pavel Maltseve2603e32016-10-25 16:03:23 -070022
23namespace android {
24namespace hardware {
25namespace vehicle {
26namespace V2_0 {
27
28namespace impl {
29
30const VehiclePropConfig kVehicleProperties[] = {
31 {
32 .prop = VehicleProperty::INFO_MAKE,
33 .access = VehiclePropertyAccess::READ,
34 .changeMode = VehiclePropertyChangeMode::STATIC,
Pavel Maltseve2603e32016-10-25 16:03:23 -070035 },
36
37 {
Pavel Maltsev30c84c32016-11-14 16:23:36 -080038 .prop = VehicleProperty::HVAC_POWER_ON,
39 .access = VehiclePropertyAccess::READ_WRITE,
40 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080041 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
42 },
43
44 {
45 .prop = VehicleProperty::HVAC_DEFROSTER,
46 .access = VehiclePropertyAccess::READ_WRITE,
47 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080048 .supportedAreas =
49 VehicleAreaWindow::FRONT_WINDSHIELD
50 | VehicleAreaWindow::REAR_WINDSHIELD
51 },
52
53 {
54 .prop = VehicleProperty::HVAC_RECIRC_ON,
55 .access = VehiclePropertyAccess::READ_WRITE,
56 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080057 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
58 },
59
60 {
61 .prop = VehicleProperty::HVAC_AC_ON,
62 .access = VehiclePropertyAccess::READ_WRITE,
63 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080064 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
65 },
66
67 {
68 .prop = VehicleProperty::HVAC_AUTO_ON,
69 .access = VehiclePropertyAccess::READ_WRITE,
70 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080071 .supportedAreas = toInt(VehicleAreaZone::ROW_1)
72 },
73
74 {
Pavel Maltseve2603e32016-10-25 16:03:23 -070075 .prop = VehicleProperty::HVAC_FAN_SPEED,
76 .access = VehiclePropertyAccess::READ_WRITE,
77 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080078 .supportedAreas = toInt(VehicleAreaZone::ROW_1),
Pavel Maltsev0e0a9252016-12-05 11:03:52 -080079 .areaConfigs = {
80 VehicleAreaConfig {
81 .areaId = toInt(VehicleAreaZone::ROW_1),
82 .minInt32Value = 1,
83 .maxInt32Value = 7
84 }
85 }
Pavel Maltsev30c84c32016-11-14 16:23:36 -080086 },
87
88 {
89 .prop = VehicleProperty::HVAC_FAN_DIRECTION,
90 .access = VehiclePropertyAccess::READ_WRITE,
91 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080092 .supportedAreas = toInt(VehicleAreaZone::ROW_1),
93 },
94
95 {
96 .prop = VehicleProperty::HVAC_TEMPERATURE_SET,
97 .access = VehiclePropertyAccess::READ_WRITE,
98 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -080099 .supportedAreas =
100 VehicleAreaZone::ROW_1_LEFT
101 | VehicleAreaZone::ROW_1_RIGHT,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800102 .areaConfigs = {
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800103 VehicleAreaConfig {
104 .areaId = toInt(VehicleAreaZone::ROW_1_LEFT),
105 .minFloatValue = 16,
106 .maxFloatValue = 32,
107 },
108 VehicleAreaConfig {
109 .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT),
110 .minFloatValue = 16,
111 .maxFloatValue = 32,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800112 }
113 }
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800114 },
115
116 {
117 .prop = VehicleProperty::NIGHT_MODE,
118 .access = VehiclePropertyAccess::READ,
119 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800120 },
121
122 {
Pavel Maltsevb5e51092016-11-22 11:01:03 -0800123 .prop = VehicleProperty::DRIVING_STATUS,
124 .access = VehiclePropertyAccess::READ,
125 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsevb5e51092016-11-22 11:01:03 -0800126 },
127
128 {
Pavel Maltsev30c84c32016-11-14 16:23:36 -0800129 .prop = VehicleProperty::GEAR_SELECTION,
130 .access = VehiclePropertyAccess::READ,
131 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltseve2603e32016-10-25 16:03:23 -0700132 },
133
134 {
135 .prop = VehicleProperty::INFO_FUEL_CAPACITY,
136 .access = VehiclePropertyAccess::READ,
137 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800138 .areaConfigs = {
139 VehicleAreaConfig {
140 .minFloatValue = 0,
141 .maxFloatValue = 1.0
142 }
143 }
Pavel Maltseve2603e32016-10-25 16:03:23 -0700144 },
145
146 {
147 .prop = VehicleProperty::DISPLAY_BRIGHTNESS,
148 .access = VehiclePropertyAccess::READ_WRITE,
149 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltsev0e0a9252016-12-05 11:03:52 -0800150 .areaConfigs = {
151 VehicleAreaConfig {
152 .minInt32Value = 0,
153 .maxInt32Value = 10
154 }
155 }
Pavel Maltsevd567a2a2016-12-14 16:07:29 -0800156 },
157
158 {
159 .prop = VehicleProperty::IGNITION_STATE,
160 .access = VehiclePropertyAccess::READ,
161 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Enrico Granata4dcdf002017-01-11 11:47:37 -0800162 },
163
164 {
165 .prop = VehicleProperty::OBD2_LIVE_FRAME,
166 .access = VehiclePropertyAccess::READ,
167 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
168 },
169
170 {
171 .prop = VehicleProperty::OBD2_FREEZE_FRAME,
172 .access = VehiclePropertyAccess::READ,
173 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
Pavel Maltseve2603e32016-10-25 16:03:23 -0700174 }
175};
176
177} // impl
178
179} // namespace V2_0
180} // namespace vehicle
181} // namespace hardware
182} // namespace android
183
184#endif // android_hardware_vehicle_V2_0_impl_DefaultConfig_H_