Merge "Adjust the parameters of accelerometer and hinge angle sensor" am: 3f4034f02b

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1517637

Change-Id: If9e9fe78d17d354e3afc1d3db301a8247993d1ef
This commit is contained in:
Hsin-Yi Chen
2020-12-07 02:37:58 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 2 deletions

View File

@@ -45,7 +45,8 @@ class HingeAngleSensor : public OnChangeSensor {
mSensorInfo.fifoReservedEventCount = 0; mSensorInfo.fifoReservedEventCount = 0;
mSensorInfo.fifoMaxEventCount = 0; mSensorInfo.fifoMaxEventCount = 0;
mSensorInfo.requiredPermission = ""; mSensorInfo.requiredPermission = "";
mSensorInfo.flags = static_cast<uint32_t>(V1_0::SensorFlagBits::ON_CHANGE_MODE); mSensorInfo.flags = static_cast<uint32_t>(V1_0::SensorFlagBits::ON_CHANGE_MODE |
V1_0::SensorFlagBits::WAKE_UP);
} }
}; };

View File

@@ -207,7 +207,7 @@ AccelSensor::AccelSensor(int32_t sensorHandle, ISensorsEventCallback* callback)
mSensorInfo.maxRange = 78.4f; // +/- 8g mSensorInfo.maxRange = 78.4f; // +/- 8g
mSensorInfo.resolution = 1.52e-5; mSensorInfo.resolution = 1.52e-5;
mSensorInfo.power = 0.001f; // mA mSensorInfo.power = 0.001f; // mA
mSensorInfo.minDelay = 20 * 1000; // microseconds mSensorInfo.minDelay = 10 * 1000; // microseconds
mSensorInfo.maxDelay = kDefaultMaxDelayUs; mSensorInfo.maxDelay = kDefaultMaxDelayUs;
mSensorInfo.fifoReservedEventCount = 0; mSensorInfo.fifoReservedEventCount = 0;
mSensorInfo.fifoMaxEventCount = 0; mSensorInfo.fifoMaxEventCount = 0;