OSDN Git Service

GEAR_* rename
authorKeun-young Park <keunyoung@google.com>
Tue, 8 Mar 2016 23:02:44 +0000 (15:02 -0800)
committerKeun-young Park <keunyoung@google.com>
Tue, 8 Mar 2016 23:02:44 +0000 (15:02 -0800)
- change to GEAR_PARK and GEAR_LOW
- also remove some build warnings

bug: 27549456
Change-Id: I9062c4570afe5cacd6a17f1cb196273a719b0a97

include/hardware/vehicle.h
modules/vehicle/vehicle.c
tests/vehicle/vehicle_test_fixtures.h

index dc1419f..4a080a1 100644 (file)
@@ -1161,9 +1161,9 @@ enum vehicle_gear {
     VEHICLE_GEAR_REVERSE    = 0x0002,
 
     // Gear selections (mostly) present only in automatic cars.
-    VEHICLE_GEAR_PARKING    = 0x0004,
+    VEHICLE_GEAR_PARK       = 0x0004,
     VEHICLE_GEAR_DRIVE      = 0x0008,
-    VEHICLE_GEAR_L          = 0x0010,
+    VEHICLE_GEAR_LOW        = 0x0010,
 
     // Other possible gear selections (maybe present in manual or automatic
     // cars).
index 38c38ee..564630c 100644 (file)
@@ -336,7 +336,7 @@ void fake_event_thread(struct subscription *sub) {
                 event.value_type = VEHICLE_VALUE_TYPE_INT32;
                 switch ((event.timestamp & 0x30000000)>>28) {
                     case 0:
-                        event.value.gear_selection = VEHICLE_GEAR_PARKING;
+                        event.value.gear_selection = VEHICLE_GEAR_PARK;
                         break;
                     case 1:
                         event.value.gear_selection = VEHICLE_GEAR_NEUTRAL;
@@ -407,7 +407,7 @@ void fake_event_thread(struct subscription *sub) {
 }
 
 static int vdev_subscribe(vehicle_hw_device_t* device, int32_t prop, float sample_rate,
-        int32_t zones) {
+        int32_t zones UNUSED) {
     ALOGD("vdev_subscribe 0x%x, %f", prop, sample_rate);
     vehicle_device_impl_t* impl = (vehicle_device_impl_t*)device;
     // Check that the device is initialized.
index 15cafaa..a9572ba 100644 (file)
@@ -55,7 +55,7 @@ int VehicleEventCallback(const vehicle_prop_value_t* event_data) {
     return 0;
 }
 
-int VehicleErrorCallback(int32_t error_code, int32_t property, int32_t operation) {
+ int VehicleErrorCallback(int32_t /*error_code*/, int32_t /*property*/, int32_t /*operation*/) {
     // Do nothing.
     return 0;
 }