commit | 8d05e217f560e42c40f06c87244d0931c562a09f | [log] [tgz] |
---|---|---|
author | Yabin Huang <yabinh@google.com> | Mon Jul 20 19:12:15 2020 -0700 |
committer | Yabin Huang <yabinh@google.com> | Tue Jul 21 17:19:05 2020 -0700 |
tree | 96c43fa9735bd3276990ea275f5b14f53bd957d8 | |
parent | 7cb89b9c031dd6b1f893ff0a34d3f2c07a5e121e [diff] |
Handle controller rotation properly Bug: 157606554 Test: manual Change-Id: I9a16bb67384f1117249c0285bbde9dad1d1582a0
make CarRotaryController -j64
To enable, run:
adb shell settings put secure enabled_accessibility_services com.android.car.rotary/com.android.car.rotary.RotaryService
To disable, run:
adb shell settings delete secure enabled_accessibility_services
To rotate the controller counter-clockwise, run:
adb shell cmd car_service inject-rotary
For clockwise, run:
adb shell cmd car_service inject-rotary -c true
To rotate the controller multiple times (100 ms ago and 50 ms ago), run:
adb shell cmd car_service inject-rotary -dt 100 50
To nudge the controller up, run:
adb shell cmd car_service inject-key 280
Use KeyCode 280
for nudge up, 281
for nudge down,282
for nudge left,283
for nudge right.
To click the controller center button, run:
adb shell cmd car_service inject-key 23