Merge pull request #107 from makermelissa/master

Fix touch on capacitive 2.8 display for portrait modes
This commit is contained in:
Limor "Ladyada" Fried 2020-08-04 09:52:14 -04:00 committed by GitHub
commit 30c45ecef3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
@ -551,9 +551,9 @@ fi
if ! $UNINSTALL; then
echo "Select rotation:"
selectN "90 degrees (landscape)" \
"180 degrees (portait)" \
"180 degrees (portrait)" \
"270 degrees (landscape)" \
"0 degrees (portait)"
"0 degrees (portrait)"
PITFT_ROTATE=$?
if [ $PITFT_ROTATE -gt 4 ]; then
exit 1
@ -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:"