ranchu: trigger rotation in goldfish_sensors on command
The original hw-sensors code miscalculated radians from degrees, which
probably happened to work on the legacy emulator, but was giving some
pretty strange values on the Android side. When fixing this, Android
calculates almost clean 9/90/180/270 orientation value based on the
below (slightly adjusted for time drift and low-pass filtering on the
Android side).
Also add support for all 4 rotation modes, which will be useful when
emulating tablets in addition to phone UI models, where full rotation
including 180 degress is supported.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
[CD: radians fix, 4 rotation modes]
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
3 files changed