forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accelerometer: Update Ash Adding AccelerometerProviderMojo
This commit refactors ash/accelerometer that if group iioservice exists, registering to Sensor Hal Dispatcher and waiting for samples updated from iioservice instead of reading on sysfs files directly for accelerometers' data. BUG=b:172208566, b:172414227, b:168434557 TEST=builds, unit tests, and run on octopus & jacuzzi. Accels' samples are updated successfully, and the auto-rotate screen is working. Cq-Depend: chromium:2470222 Change-Id: Icf65705b2b8facb7fe79423edba163639e2ae45f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2345942 Reviewed-by: Xiaoqian Dai <xdai@chromium.org> Reviewed-by: Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Cheng-Hao Yang <chenghaoyang@chromium.org> Cr-Commit-Position: refs/heads/master@{#827626}
- Loading branch information
1 parent
706cc01
commit 0196b31
Showing
14 changed files
with
1,616 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef ASH_ACCELEROMETER_ACCELEROMETER_CONSTANTS_H_ | ||
#define ASH_ACCELEROMETER_ACCELEROMETER_CONSTANTS_H_ | ||
|
||
#include "ash/accelerometer/accelerometer_types.h" | ||
|
||
namespace ash { | ||
|
||
const char kAccelerometerChannels[][8] = {"accel_x", "accel_y", "accel_z"}; | ||
|
||
// The number of axes for which there are accelerometer readings. | ||
constexpr uint32_t kNumberOfAxes = 3u; | ||
|
||
// The names of the accelerometers. Matches up with the enum AccelerometerSource | ||
// in ash/accelerometer/accelerometer_types.h. | ||
const char kLocationStrings[ACCELEROMETER_SOURCE_COUNT][5] = {"lid", "base"}; | ||
|
||
} // namespace ash | ||
|
||
#endif // ASH_ACCELEROMETER_ACCELEROMETER_CONSTANTS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.