Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,24 @@ if [ $scriptAction == 'INSTALL' ]; then
echo "display_hdmi_rotate=2" >> "$configFile.tmp"
fi
fi
echo "#### RpiDisplaySetup end" >> "$configFile.tmp"

echo "#### RpiDisplaySetup end" >> "$configFile.tmp"

# patch start-gui.sh for Qt touch rotation when display_lcd_rotate is used
startGuiSh="/opt/victronenergy/gui/start-gui.sh"
if [ -f "$setupOptionsDir/altRotateDisplay" ]; then
if ! grep -q "QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS" "$startGuiSh" 2>/dev/null; then
logMessage "patching start-gui.sh for Qt touch rotation 180"
sed -i 's|export QT_QPA_PLATFORM=linuxfb|export QT_QPA_PLATFORM=linuxfb\n\texport QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/touchscreen0:rotate=180|' "$startGuiSh"
restartGui=true
fi
else
if grep -q "QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS" "$startGuiSh" 2>/dev/null; then
logMessage "removing Qt touch rotation patch from start-gui.sh"
sed -i '/QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS/d' "$startGuiSh"
restartGui=true
fi
fi

# detect changes
cmp -s $configFile "$configFile.tmp" > /dev/null
if (( $? == 1 )); then
Expand Down