Wileyfox Swift rotate and autorotate fix

Signed-off-by: Stacy Harper <contact@stacyharper.net>
master
Alex O 3 years ago committed by Stacy Harper
parent f60ef805bc
commit 5741f0692c
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 8
      scripts/core/sxmo_rotate.sh
  2. 8
      scripts/core/sxmo_rotateautotoggle.sh
  3. 7
      scripts/deviceprofiles/sxmo_deviceprofile_l8150qcom.sh

@ -5,10 +5,10 @@
. "$(dirname "$0")/sxmo_common.sh"
applyptrmatrix() {
PTRID="$(
xinput | grep -iE 'touchscreen.+pointer' | grep -oE 'id=[0-9]+' | cut -d= -f2
)"
xinput set-prop "$PTRID" --type=float --type=float "Coordinate Transformation Matrix" "$@"
TOUCH_POINTER_ID="${TOUCH_POINTER_ID:-
(xinput | grep -iE 'touchscreen.+pointer' | grep -oE 'id=[0-9]+' | cut -d= -f2)
}"
xinput set-prop "$TOUCH_POINTER_ID" --type=float --type=float "Coordinate Transformation Matrix" "$@"
}
isrotated() {

@ -1,9 +1,9 @@
#!/usr/bin/env sh
GRAVITY="16374"
THRESHOLD="400"
ROTATION_GRAVITY="${ROTATION_GRAVITY:-"16374"}"
ROTATION_THRESHOLD="${ROTATION_THRESHOLD:-"400"}"
POLL_TIME=1
RIGHT_SIDE_UP="$(echo "$GRAVITY - $THRESHOLD" | bc)"
UPSIDE_DOWN="$(echo "-$GRAVITY + $THRESHOLD" | bc)"
RIGHT_SIDE_UP="$(echo "$ROTATION_GRAVITY - $ROTATION_THRESHOLD" | bc)"
UPSIDE_DOWN="$(echo "-$ROTATION_GRAVITY + $ROTATION_THRESHOLD" | bc)"
FILE_Y="$(find /sys/bus/iio/devices/iio:device*/ -iname in_accel_y_raw)"
FILE_X="$(find /sys/bus/iio/devices/iio:device*/ -iname in_accel_x_raw)"

@ -1,3 +1,10 @@
#!/bin/sh
# Wileyfox Swift (wileyfox-crackling)
export BATTERY_DEVICE="/sys/class/power_supply/pm8916-bms-vm"
export TOUCH_POINTER_ID="10"
export ROTATION_GRAVITY="500"
export ROTATION_THRESHOLD="60"

Loading…
Cancel
Save