Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95adf19d authored by Chris Ye's avatar Chris Ye
Browse files

Add motion sensor configuration for Sony DS4.

Add sensor default axes mapping in generic key layout map.
Add sensor axes mappings and configurations for input device sensor support.

Bug: 161634265
Test: atest InputDeviceSensorManagerTest
Change-Id: I8279a146d39b9f99378d152935b1522674c81b85
parent a54c2a82
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -445,3 +445,11 @@ led 0x07 MUTE
led 0x08 MISC
led 0x09 MAIL
led 0x0a CHARGING

# SENSORs
sensor 0x00 ACCELEROMETER X
sensor 0x01 ACCELEROMETER Y
sensor 0x02 ACCELEROMETER Z
sensor 0x03 GYROSCOPE X
sensor 0x04 GYROSCOPE Y
sensor 0x05 GYROSCOPE Z
+35 −0
Original line number Diff line number Diff line
# Copyright (C) 2020 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Sony DS4 motion sensor configuration file.
#

# reporting mode 0 - continuous
sensor.accelerometer.reportingMode = 0
# The delay between sensor events corresponding to the lowest frequency in microsecond
sensor.accelerometer.maxDelay = 100000
# The minimum delay allowed between two events in microsecond
sensor.accelerometer.minDelay = 5000
# The power in mA used by this sensor while in use
sensor.accelerometer.power = 1.5

# reporting mode 0 - continuous
sensor.gyroscope.reportingMode = 0
# The delay between sensor events corresponding to the lowest frequency in microsecond
sensor.gyroscope.maxDelay = 100000
# The minimum delay allowed between two events in microsecond
sensor.gyroscope.minDelay = 5000
# The power in mA used by this sensor while in use
sensor.gyroscope.power = 0.8
+8 −0
Original line number Diff line number Diff line
@@ -68,3 +68,11 @@ key 0x13c BUTTON_MODE
# and this button will be equivalent to left mouse button
# Therefore, map it to KEYCODE_BUTTON_1 here to allow apps to still handle this on earlier versions
key 0x13d   BUTTON_1

# SENSORs
sensor 0x00 ACCELEROMETER X
sensor 0x01 ACCELEROMETER Y
sensor 0x02 ACCELEROMETER Z
sensor 0x03 GYROSCOPE X
sensor 0x04 GYROSCOPE Y
sensor 0x05 GYROSCOPE Z
+8 −0
Original line number Diff line number Diff line
@@ -66,3 +66,11 @@ key 0x13c BUTTON_MODE

# In kernel versions >= 4.10, the touchpad is a separate input device,
# so the touchpad button click will not be covered by this layout.

# SENSORs
sensor 0x00 ACCELEROMETER X
sensor 0x01 ACCELEROMETER Y
sensor 0x02 ACCELEROMETER Z
sensor 0x03 GYROSCOPE X
sensor 0x04 GYROSCOPE Y
sensor 0x05 GYROSCOPE Z
+8 −0
Original line number Diff line number Diff line
@@ -66,3 +66,11 @@ key 0x13c BUTTON_MODE

# In kernel versions >= 4.10, the touchpad is a separate input device,
# so the touchpad button click will not be covered by this layout.

# SENSORs
sensor 0x00 ACCELEROMETER X
sensor 0x01 ACCELEROMETER Y
sensor 0x02 ACCELEROMETER Z
sensor 0x03 GYROSCOPE X
sensor 0x04 GYROSCOPE Y
sensor 0x05 GYROSCOPE Z
Loading