From ef03b05e819fb9e145877d5207908a596ecae3be Mon Sep 17 00:00:00 2001 From: Daniel Knight Date: Sat, 20 Oct 2018 16:02:40 +0100 Subject: [PATCH] v6.17 - DietPi-Config | Waveshare32b: Resolved inverted inputs under X11/Xorg: https://github.com/Fourdee/DietPi/issues/803 --- CHANGELOG.txt | 1 + dietpi/func/dietpi-set_hardware | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 65b55dd91e..35c91fa13b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,6 +21,7 @@ Changes / Improvements / Optimizations: Bug Fixes: - DietPi-Config | WiFi-Monitor: Resolved an issue with syntax, and, incorrectly pinging the default gateway, instead of whats assigned to the wlan interface: https://github.com/Fourdee/DietPi/issues/2103 - DietPi-Config | dietpi-wifi.db code has been optimized, and, also resolves an issue where '/var/lib/dietpi/dietpi-wifi.db' was not generated automatically: https://github.com/Fourdee/DietPi/issues/2087#issuecomment-423836528 + - DietPi-Config | Waveshare32b: Resolved inverted inputs under X11/Xorg: https://github.com/Fourdee/DietPi/issues/803 - DietPi-Drive_Manager | Resolved an issue where swapfile would register as enabled when set to 0 size: https://github.com/Fourdee/DietPi/issues/2127 - DietPi-Survey | Resolved an issue where dietpi-survey under mode 1 would not generate the survey file. - DietPi-Software | MPD: Now runs under the group 'dietpi' and user 'root', allowing access to music directories when contained on samba networked drives: https://github.com/Fourdee/DietPi/issues/2092 diff --git a/dietpi/func/dietpi-set_hardware b/dietpi/func/dietpi-set_hardware index 349fe44592..aa52ea7960 100644 --- a/dietpi/func/dietpi-set_hardware +++ b/dietpi/func/dietpi-set_hardware @@ -574,7 +574,7 @@ _EOF_ Lcd_Panel_Xorg_All_Enable(){ #Xinput calibrator, fbset for con2fbmap - G_AG_CHECK_INSTALL_PREREQ fbset xinput-calibrator + G_AG_CHECK_INSTALL_PREREQ fbset xinput-calibrator xserver-xorg-input-evdev mkdir -p /etc/X11/xorg.conf.d @@ -601,7 +601,7 @@ _EOF_ cat << _EOF_ > /etc/X11/xorg.conf.d/99-waveshare32_xorg.conf Section "Device" Identifier "Allwinner A10/A13 FBDEV" - Driver "fbturbo" + Driver "fbdev" Option "fbdev" "/dev/fb1" Option "SwapbuffersWait" "true" @@ -610,10 +610,11 @@ _EOF_ cat << _EOF_ > /etc/X11/xorg.conf.d/99-waveshare32_calibration.conf Section "InputClass" - Identifier "calibration" - MatchProduct "ADS7846 Touchscreen" - Option "Calibration" "219 3835 3984 219" - Option "SwapAxes" "1" +Identifier "calibration" +MatchProduct "ADS7846 Touchscreen" +Option "Calibration" "219 3835 3984 219" +Option "SwapAxes" "1" +Driver "evdev" EndSection _EOF_ @@ -639,13 +640,10 @@ _EOF_ G_CONFIG_INJECT 'dtparam=i2c_arm=' 'dtparam=i2c_arm=on' $FP_RPI_CONFIG G_CONFIG_INJECT 'dtparam=spi=' 'dtparam=spi=on' $FP_RPI_CONFIG - cat << _EOF_ >> $FP_RPI_CONFIG #Waveshare 32 LCD dtoverlay=waveshare32b:rotate=270 -#dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=0,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900 -#dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1 _EOF_ # - Swap input axis @@ -710,14 +708,14 @@ _EOF_ Lcd_Panel_Waveshare32_Disable(){ #all - rm /etc/X11/xorg.conf.d/99-waveshare32_calibration.conf - rm /etc/X11/xorg.conf.d/99-waveshare32_xorg.conf - rm /usr/share/applications/xinput_calibrator.desktop + rm /etc/X11/xorg.conf.d/99-waveshare32_calibration.conf &> /dev/null + rm /etc/X11/xorg.conf.d/99-waveshare32_xorg.conf &> /dev/null + rm /usr/share/applications/xinput_calibrator.desktop &> /dev/null #RPi if (( $G_HW_MODEL < 10 )); then - rm /boot/overlays/waveshare32b.dtbo + rm /boot/overlays/waveshare32b.dtbo &> /dev/null sed -i 's/ fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo//' /boot/cmdline.txt sed -i '/Waveshare 32 LCD/d' $FP_RPI_CONFIG @@ -730,15 +728,15 @@ _EOF_ #sed -i "/dtparam=spi=/c\dtparam=spi=on" $FP_RPI_CONFIG # - Move fb0 xorg.conf back: https://github.com/Fourdee/DietPi/issues/767 - mv /usr/share/X11/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf + mv /usr/share/X11/99-fbturbo.conf /usr/share/X11/xorg.conf.d/99-fbturbo.conf &> /dev/null #Odroids elif (( $G_HW_MODEL >= 10 && $G_HW_MODEL < 20 )); then - rm /etc/systemd/system/con2fbmap.service + rm /etc/systemd/system/con2fbmap.service &> /dev/null systemctl daemon-reload - rm /etc/modprobe.d/waveshare32.conf + rm /etc/modprobe.d/waveshare32.conf &> /dev/null sed -i '/^spicc/d' /etc/modules sed -i '/^fbtft_device/d' /etc/modules