Merge pull request #107 from makermelissa/master
Fix touch on capacitive 2.8 display for portrait modes
This commit is contained in:
commit
30c45ecef3
1 changed files with 6 additions and 6 deletions
|
|
@ -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:"
|
||||
|
|
|
|||
Loading…
Reference in a new issue