Fix touch on capacitive 2.8 display for portrait modes

This commit is contained in:
Melissa LeBlanc-Williams 2020-08-03 19:04:02 -07:00
parent 1ffb79a37f
commit a581a7745c

View file

@ -47,9 +47,9 @@ TRANSFORM_28c90="0 1 0 -1 0 1 0 0 1"
TRANSFORM_28c180="1 0 0 0 1 0 0 0 1"
TRANSFORM_28c270="0 -1 1 1 0 0 0 0 1"
ROTATE_28c0="rotate=0,touch-invx=true,touch-invy=true"
ROTATE_28c0="rotate=90,touch-invx=true,touch-invy=true"
ROTATE_28c90="rotate=90,touch-swapxy=true,touch-invx=true"
ROTATE_28c180="rotate=180"
ROTATE_28c180="rotate=90"
ROTATE_28c270="rotate=270,touch-swapxy=true,touch-invy=true"
warning() {
@ -232,7 +232,7 @@ function update_configtxt() {
fi
if [ "${pitfttype}" == "28c" ]; then
rotateparams=$(eval echo "\$ROTATE_$pitfttype$pitftrot")
rotateparams=$(eval echo "\$ROTATE_$pitfttype$touchrot")
overlay=$(printf "dtoverlay=pitft28-capacitive,speed=64000000,fps=30\ndtoverlay=pitft28-capacitive,${rotateparams}")
fi
@ -622,7 +622,7 @@ if ! $UNINSTALL;
then
pitfttype=${PITFT_TYPES[$PITFT_SELECT-1]}
pitftrot=${PITFT_ROTATIONS[$PITFT_ROTATE-1]}
touchrot=$pitftrot
if [ "${pitfttype}" != "28r" ] && [ "${pitfttype}" != "28c" ] && [ "${pitfttype}" != "35r" ] && [ "${pitfttype}" != "22" ] && [ "${pitfttype}" != "st7789_240x240" ] && [ "${pitfttype}" != "st7789_240x320" ] && [ "${pitfttype}" != "st7789_240x135" ]; then
echo "Type must be one of:"