sensors: Remove DeviceType::MAX and Add DeviceType::GRAVITY in the mojo interface
Deprecate DeviceType::MAX, as it couldn't be maintained backward-compatibily, and DeviceType::kMaxValue is sufficient. To support gravity sensor, which is a fusion sensor, add it in the enum DeviceType. Corresponding CL:2961889 in chromeos platform2. BUG=b:184281732 TEST=builds Change-Id: Ib50ea237ff93a760a95af9b7582c094472c7291d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2975041 Commit-Queue: Cheng-Hao Yang <chenghaoyang@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#894577}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
b666d7d227
commit
f3b51cc2e8
@@ -31,6 +31,7 @@ const string kLocationCamera = "camera";
|
|||||||
const string kAccelerometerChannel = "accel";
|
const string kAccelerometerChannel = "accel";
|
||||||
const string kGyroscopeChannel = "anglvel";
|
const string kGyroscopeChannel = "anglvel";
|
||||||
const string kMagnetometerChannel = "magn";
|
const string kMagnetometerChannel = "magn";
|
||||||
|
const string kGravityChannel = "gravity";
|
||||||
|
|
||||||
// The light sensor may have not only channel "illuminance", but three color
|
// The light sensor may have not only channel "illuminance", but three color
|
||||||
// channels: illuminance_red, illuminance_green, and illuminance_blue.
|
// channels: illuminance_red, illuminance_green, and illuminance_blue.
|
||||||
@@ -41,7 +42,7 @@ const string kTimestampChannel = "timestamp";
|
|||||||
|
|
||||||
[Stable, Extensible]
|
[Stable, Extensible]
|
||||||
enum DeviceType {
|
enum DeviceType {
|
||||||
NONE = 0, // invalid device type
|
[Default] NONE = 0, // invalid device type
|
||||||
ACCEL = 1,
|
ACCEL = 1,
|
||||||
ANGLVEL = 2,
|
ANGLVEL = 2,
|
||||||
LIGHT = 3,
|
LIGHT = 3,
|
||||||
@@ -52,12 +53,12 @@ enum DeviceType {
|
|||||||
ACCEL_UNCALIBRATED = 8,
|
ACCEL_UNCALIBRATED = 8,
|
||||||
ANGLVEL_UNCALIBRATED = 9,
|
ANGLVEL_UNCALIBRATED = 9,
|
||||||
MAGN_UNCALIBRATED = 10,
|
MAGN_UNCALIBRATED = 10,
|
||||||
MAX = 11,
|
GRAVITY = 11,
|
||||||
};
|
};
|
||||||
|
|
||||||
[Stable, Extensible]
|
[Stable, Extensible]
|
||||||
enum ObserverErrorType {
|
enum ObserverErrorType {
|
||||||
ALREADY_STARTED = 0,
|
[Default] ALREADY_STARTED = 0,
|
||||||
SET_FREQUENCY_IO_FAILED = 1,
|
SET_FREQUENCY_IO_FAILED = 1,
|
||||||
FREQUENCY_INVALID = 2,
|
FREQUENCY_INVALID = 2,
|
||||||
NO_ENABLED_CHANNELS = 3,
|
NO_ENABLED_CHANNELS = 3,
|
||||||
|
Reference in New Issue
Block a user