Skip to content

Commit be42bf9

Browse files
committed
2 parents fa8b85a + 0400cfb commit be42bf9

4 files changed

Lines changed: 15 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# VeElecrowDisplay - Victron VenusOs package for 5" HDMI 800 x 480 Capacitive Touch LCD Display
1+
# Victron VenusOs package for 5" HDMI 800 x 480 Capacitive Touch LCD Display
22

33
## Introduction
44

changes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
v1.1
2+
first working version, tested on Venus OS 3.13
13

24
v1.0
3-
initial version, tested on Venus OS 3.13
5+
initial version

setup

100644100755
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,22 @@ if [ $scriptAction == 'INSTALL' ] ; then
7979
display_rotate=0
8080
if [ -f $setupOptionsDir/rotateDisplay ]; then
8181
display_rotate=2
82+
fi
8283
gpioPin=23
8384
if [ -f $setupOptionsDir/backlight_gpio_pin ]; then
8485
gpioPin=$(cat "$setupOptionsDir/backlight_gpio_pin")
85-
86+
fi
8687
# install overlay only if it doesn't exist
8788
[ -f "$overlayFile" ] || logMessage "installing Display Backlight overlay" && rebootNeeded=true && updateActiveFile "$overlayFile"
8889

89-
if [ $(grep -c "VeElecrowDisplay" "$configFile") == 0 ]; then
90-
logMessage "activating VeElecrowDisplay settings in $configFile"
90+
if [ $(grep -c "VeTouchDisplay" "$configFile") == 0 ]; then
91+
logMessage "activating VeTouchDisplay settings in $configFile"
9192
cp $configFile $configFile.tmp
9293
# remove any previouos lines added by this script
93-
sed -i -e "/#### begin VeElecrowDisplay/,/#### end VeElecrowDisplay/d" "$configFile.tmp"
94+
sed -i -e "/#### begin VeTouchDisplay/,/#### end VeTouchDisplay/d" "$configFile.tmp"
9495

9596
echo "" >> "$configFile.tmp"
96-
echo "#### begin VeElecrowDisplay" >> "$configFile.tmp"
97+
echo "#### begin VeTouchDisplay" >> "$configFile.tmp"
9798
echo "# Elecrow RC050 5 inch HDMI 800 x 480 Capacitive Touch LCD Display for Raspberry Pi/ PC/ SONY PS4" >> "$configFile.tmp"
9899
echo "# https://www.elecrow.com/wiki/index.php?title=RC050_5_inch_HDMI_800_x_480_Capacitive_Touch_LCD_Display_for_Raspberry_Pi/_PC/_SONY_PS4" >> "$configFile.tmp"
99100
echo "hdmi_force_hotplug=1" >> "$configFile.tmp"
@@ -110,7 +111,7 @@ if [ $scriptAction == 'INSTALL' ] ; then
110111
echo "# for backlight on / off" >> "$configFile.tmp"
111112
echo "# gpio-led overlay allows to invert the backlight (echo 0 for on and 1 for off, like backlight blanking)" >> "$configFile.tmp"
112113
echo "dtoverlay=gpio-led,gpio=$gpioPin,label=backlight,active_low=1" >> "$configFile.tmp"
113-
echo "#### end VeElecrowDisplay" >> "$configFile.tmp"
114+
echo "#### end VeTouchDisplay" >> "$configFile.tmp"
114115
echo "" >> "$configFile.tmp"
115116
rebootNeeded=true
116117
fi
@@ -137,7 +138,7 @@ if [ $scriptAction == 'INSTALL' ] ; then
137138
# enable screen saver (blanking) from the Venus
138139
if [ "$gpioPin" != "" ]; then
139140
if [ ! -e "$blankDeviceFile" ] || [ $(grep -c "/sys/class/leds/backlight/brightness" "$blankDeviceFile") == 0 ]; then
140-
logMessage "setting display blanking to $blankDevice"
141+
logMessage "setting display blanking to GPIO pin $gpioPin"
141142
echo "/sys/class/leds/backlight/brightness" > "$blankDeviceFile"
142143
restartGui=true
143144
fi
@@ -171,8 +172,8 @@ if [ $scriptAction == 'UNINSTALL' ] ; then
171172

172173
# remove mods from configFile - do not use restore in case other mods were made manually
173174
if [ -f "$configFile" ]; then
174-
if [ $(grep -c "#### begin VeElecrowDisplay" "$configFile") != 0 ]; then
175-
sed -i -e '/#### begin VeElecrowDisplay/,/#### end VeElecrowDisplay/d' "$configFile"
175+
if [ $(grep -c "#### begin VeTouchDisplay" "$configFile") != 0 ]; then
176+
sed -i -e '/#### begin VeTouchDisplay/,/#### end VeTouchDisplay/d' "$configFile"
176177
rebootNeeded=true
177178
fi
178179
fi

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0
1+
v1.1

0 commit comments

Comments
 (0)