diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-02-03 17:49:48 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-02-22 00:48:29 +0000 |
commit | 6f2869903d2c6d0147a9f0b0dbfb40f62c6af0ab (patch) | |
tree | 61aa1fdc55294441684bfee0ac4ba2afc4369f2b /include/console.h | |
parent | 9305b84ab2a844393b90b897c394a557d8dfa8fb (diff) | |
download | chrome-ec-6f2869903d2c6d0147a9f0b0dbfb40f62c6af0ab.tar.gz |
rambi: Add motion sense task to track motion
Added motion sense task to Clapper and Glimmer. This task samples
the accelerometers and calculate a lid angle. Note that as
the machine is rotated towards the hinge angle aligning
with gravity, the lid calculation becomes less trustworthy.
Added a math_util file to hold various mathematical functions
useful for calculating lid angle that may be helpful in other
places.
For each board with accelerometers we need to define some
orientation specific data in board.c. There is a calibration
procedure through the EC console that can be enabled by
defining CONFIG_ACCEL_CALIBRATE. The calibration procedure can
help determine the orientation data required.
For debugging purposes there is a console command to regularly
print to the EC console the accelerometer data and derived lid
angle. The console command can be enabled by defining
CONFIG_CMD_LID_ANGLE.
BUG=none
Original-BUG=chrome-os-partner:24703
BRANCH=rambi
TEST=Ran the calibration procedure on a Glimmer unit, and then
rotated the machine in space. Verified that the lid angle
calculated roughly matched actual lid angle.
Original-Change-Id: I63a5e384b7f6b628b4ea01de49843355fb8d6ebe
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/184783
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Signed-off-by: Alec Berg <alecaberg@chromium.org>
(cherry picked from commit efb07945a5159fa0e7a746c666b2519ebdca9c22)
Conflicts:
board/clapper/board.c
board/clapper/ec.tasklist
board/glimmer/board.c
board/glimmer/ec.tasklist
Change-Id: Ibc492ef5c11e7084e87f01338c4d7775f9a08c18
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/187433
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/console.h')
-rw-r--r-- | include/console.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index 1dd37e42c9..41bc9decbd 100644 --- a/include/console.h +++ b/include/console.h @@ -40,6 +40,7 @@ enum console_channel { CC_KEYSCAN, CC_LIGHTBAR, CC_LPC, + CC_MOTION_SENSE, CC_PORT80, CC_PWM, CC_SPI, |