mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Update
Former-commit-id: 3c6ac5d2f618cd7499c16bca950ff3d41f855318
This commit is contained in:
parent
1f18073f00
commit
fb7445b545
@ -27,7 +27,7 @@ cd "$HYPERION_DIR/build"
|
|||||||
cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
cmake -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||||
# run cmake to generate make files on the raspberry pi WITH PWM SUPPORT
|
# run cmake to generate make files on the raspberry pi WITH PWM SUPPORT
|
||||||
cmake -DENABLE_WS2812BPWM=ON -DENABLE_WS281XPWM=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
cmake -DENABLE_WS2812BPWM=ON -DENABLE_WS281XPWM=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||||
# or if you are not compiling on the raspberry pi and need to disable the Dispmanx grabber and support for spi devices
|
# or if you are not compiling on the raspberry pi (e.g. OrangePi) and need to disable the Dispmanx grabber and support for spi devices
|
||||||
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_X11=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||||
# as an alternative for the dispmanx grabber on non-rpi devices (e.g. cubox-i) you could try the framebuffer grabber
|
# as an alternative for the dispmanx grabber on non-rpi devices (e.g. cubox-i) you could try the framebuffer grabber
|
||||||
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
cmake -DENABLE_DISPMANX=OFF -DENABLE_SPIDEV=OFF -DENABLE_FB=ON -DCMAKE_BUILD_TYPE=Release -Wno-dev ..
|
||||||
|
@ -4,5 +4,5 @@ Please check the wiki in case your problem is already known/feature requested.**
|
|||||||
**1.** Used hardware and sofware (Wetek,RPi1,Rpi2,... Ubuntu 14.04(64bit),OSX,OpenELEC,OSMC,XBian,...)
|
**1.** Used hardware and sofware (Wetek,RPi1,Rpi2,... Ubuntu 14.04(64bit),OSX,OpenELEC,OSMC,XBian,...)
|
||||||
**2.** Your LED device and additional hardware (if used) (WS2801,APA102,WS2812B,... connected through (direct,arduino uno,...))
|
**2.** Your LED device and additional hardware (if used) (WS2801,APA102,WS2812B,... connected through (direct,arduino uno,...))
|
||||||
**3.** Please upload your Hyperion log to pastebin.com and insert the link. Have a look at the wiki how you get one.
|
**3.** Please upload your Hyperion log to pastebin.com and insert the link. Have a look at the wiki how you get one.
|
||||||
**4.** Please upload your "Hyperion Configuration File" to www.jsoneditoronline.org and insert the link.
|
**4.** Please upload your "Hyperion Configuration File" to pastebin.com and insert the link.
|
||||||
|
|
||||||
|
@ -4,8 +4,18 @@
|
|||||||
# Make sure /sbin is on the path (for service to find sub scripts)
|
# Make sure /sbin is on the path (for service to find sub scripts)
|
||||||
PATH="/sbin:$PATH"
|
PATH="/sbin:$PATH"
|
||||||
|
|
||||||
|
#Check which arguments are used
|
||||||
|
if [ "$1" = "HyperConInstall" ] || [ "$2" = "HyperConInstall" ]; then
|
||||||
|
HCInstall=1
|
||||||
|
else HCInstall=0
|
||||||
|
fi
|
||||||
|
if [ "$1" = "WS281X" ] || [ "$2" = "WS281X" ]; then
|
||||||
|
PWM=1
|
||||||
|
else PWM=0
|
||||||
|
fi
|
||||||
|
|
||||||
#Check if HyperCon is logged in as root
|
#Check if HyperCon is logged in as root
|
||||||
if [ $(id -u) != 0 ] && [ "$1" = "HyperConInstall" ]; then
|
if [ $(id -u) != 0 ] && [ $HCInstall -eq 1 ]; then
|
||||||
echo '---> Critical Error: Please connect as user "root" through HyperCon'
|
echo '---> Critical Error: Please connect as user "root" through HyperCon'
|
||||||
echo '---> We need admin privileges to install/update your Hyperion! -> abort'
|
echo '---> We need admin privileges to install/update your Hyperion! -> abort'
|
||||||
exit 1
|
exit 1
|
||||||
@ -78,7 +88,7 @@ if [ $OS_OPENELEC -ne 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Check, if dtparam=spi=on is in place (not for OPENELEC)
|
#Check, if dtparam=spi=on is in place (not for OPENELEC)
|
||||||
if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -ne 1 ]; then
|
if [ $PWM -ne 1 ] && [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -ne 1 ]; then
|
||||||
SPIOK=`grep '^\dtparam=spi=on' /boot/config.txt | wc -l`
|
SPIOK=`grep '^\dtparam=spi=on' /boot/config.txt | wc -l`
|
||||||
if [ $SPIOK -ne 1 ]; then
|
if [ $SPIOK -ne 1 ]; then
|
||||||
echo '---> Raspberry Pi found, but SPI is not ready, we write "dtparam=spi=on" to /boot/config.txt'
|
echo '---> Raspberry Pi found, but SPI is not ready, we write "dtparam=spi=on" to /boot/config.txt'
|
||||||
@ -88,7 +98,7 @@ if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -ne 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#Check, if dtparam=spi=on is in place (just for OPENELEC)
|
#Check, if dtparam=spi=on is in place (just for OPENELEC)
|
||||||
if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ]; then
|
if [ $PWM -ne 1 ] && [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ]; then
|
||||||
SPIOK=`grep '^\dtparam=spi=on' /flash/config.txt | wc -l`
|
SPIOK=`grep '^\dtparam=spi=on' /flash/config.txt | wc -l`
|
||||||
if [ $SPIOK -ne 1 ]; then
|
if [ $SPIOK -ne 1 ]; then
|
||||||
mount -o remount,rw /flash
|
mount -o remount,rw /flash
|
||||||
@ -98,6 +108,28 @@ if [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ]; then
|
|||||||
REBOOTMESSAGE="echo Please reboot your OpenELEC, we inserted dtparam=spi=on to /flash/config.txt"
|
REBOOTMESSAGE="echo Please reboot your OpenELEC, we inserted dtparam=spi=on to /flash/config.txt"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Check, if dtoverlay=pwm is in place (not for OPENELEC)
|
||||||
|
#if [ $PWM -eq 1 ] && [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -ne 1 ]; then
|
||||||
|
# PWMOK=`grep '^\dtoverlay=pwm' /boot/config.txt | wc -l`
|
||||||
|
# if [ $PWMOK -ne 1 ]; then
|
||||||
|
# echo '---> Raspberry Pi found, but PWM is not ready, we write "dtoverlay=pwm" to /boot/config.txt'
|
||||||
|
# sed -i '$a dtoverlay=pwm' /boot/config.txt
|
||||||
|
# PWMREBOOTMESSAGE="echo Please reboot your Raspberry Pi, we inserted dtoverlay=pwm to /boot/config.txt"
|
||||||
|
# fi
|
||||||
|
#fi
|
||||||
|
|
||||||
|
#Check, if dtoverlay=pwm is in place (just for OPENELEC)
|
||||||
|
if [ $PWM -eq 1 ] && [ $CPU_RPI -eq 1 ] && [ $OS_OPENELEC -eq 1 ]; then
|
||||||
|
PWMOK=`grep '^\dtoverlay=pwm' /flash/config.txt | wc -l`
|
||||||
|
if [ $PWMOK -ne 1 ]; then
|
||||||
|
mount -o remount,rw /flash
|
||||||
|
echo '---> Raspberry Pi with OpenELEC found, but PWM is not ready, we write "dtoverlay=pwm" to /flash/config.txt'
|
||||||
|
sed -i '$a dtoverlay=pwm' /flash/config.txt
|
||||||
|
mount -o remount,ro /flash
|
||||||
|
PWMREBOOTMESSAGE="echo Please reboot your OpenELEC, we inserted dtoverlay=pwm to /flash/config.txt"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
#Backup the .conf files, if present
|
#Backup the .conf files, if present
|
||||||
echo '---> Backup Hyperion configuration(s), if present'
|
echo '---> Backup Hyperion configuration(s), if present'
|
||||||
rm -f /tmp/*.json 2>/dev/null
|
rm -f /tmp/*.json 2>/dev/null
|
||||||
@ -177,16 +209,29 @@ elif [ $OS_OPENELEC -eq 1 ]; then
|
|||||||
echo "/storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json > /dev/null 2>&1 &" >> /storage/.config/autostart.sh
|
echo "/storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json > /dev/null 2>&1 &" >> /storage/.config/autostart.sh
|
||||||
chmod +x /storage/.config/autostart.sh
|
chmod +x /storage/.config/autostart.sh
|
||||||
fi
|
fi
|
||||||
|
# only add hyperion-x11 to startup, if not found and x32x64 detected
|
||||||
|
if [ $CPU_X32X64 -eq 1 ] && [ `cat /storage/.config/autostart.sh 2>/dev/null | grep hyperion-x11 | wc -l` -eq 0 ]; then
|
||||||
|
echo '---> Adding Hyperion-x11 to OpenELEC autostart.sh'
|
||||||
|
echo "DISPLAY=:0.0 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/storage/hyperion/bin /storage/hyperion/bin/hyperion-x11 </dev/null >/dev/null 2>&1 &" >> /storage/.config/autostart.sh
|
||||||
|
fi
|
||||||
elif [ $USE_SYSTEMD -eq 1 ]; then
|
elif [ $USE_SYSTEMD -eq 1 ]; then
|
||||||
echo '---> Installing systemd script'
|
echo '---> Installing systemd script'
|
||||||
#place startup script for systemd and activate
|
#place startup script for systemd and activate
|
||||||
#Problem with systemd to enable symlinks - Bug? Workaround cp -n (overwrite never)
|
#Problem with systemd to enable symlinks - Bug? Workaround cp -n (overwrite never)
|
||||||
#Bad workaround for Jessie users that used the official script for install
|
#Bad workaround for Jessie (systemd) users that used the official script for install
|
||||||
update-rc.d -f hyperion remove 2>/dev/null
|
update-rc.d -f hyperion remove 2>/dev/null
|
||||||
rm /etc/init.d/hyperion 2>/dev/null
|
rm /etc/init.d/hyperion 2>/dev/null
|
||||||
cp -n /opt/hyperion/init.d/hyperion.systemd.sh /etc/systemd/system/hyperion.service
|
cp -n /opt/hyperion/init.d/hyperion.systemd.sh /etc/systemd/system/hyperion.service
|
||||||
systemctl -q enable hyperion.service
|
systemctl -q enable hyperion.service
|
||||||
if [ $OS_OSMC -eq 1 ]; then
|
if [ $PWM -eq 1 ] && [ $OS_OSMC -eq 1 ]; then
|
||||||
|
echo '---> Modify systemd script for OSMC usage (PWM Support)'
|
||||||
|
# Wait until kodi is sarted (for xbmc checker) and FIX user in case it is wrong (need root for access to pwm!)!
|
||||||
|
sed -i '/After = mediacenter.service/d' /etc/systemd/system/hyperion.service
|
||||||
|
sed -i '/Unit/a After = mediacenter.service' /etc/systemd/system/hyperion.service
|
||||||
|
sed -i 's/User=osmc/User=root/g' /etc/systemd/system/hyperion.service
|
||||||
|
sed -i 's/Group=osmc/Group=root/g' /etc/systemd/system/hyperion.service
|
||||||
|
systemctl -q daemon-reload
|
||||||
|
elif [ $OS_OSMC -eq 1 ]; then
|
||||||
echo '---> Modify systemd script for OSMC usage'
|
echo '---> Modify systemd script for OSMC usage'
|
||||||
# Wait until kodi is sarted (for xbmc checker) and replace user (for remote control through osmc)
|
# Wait until kodi is sarted (for xbmc checker) and replace user (for remote control through osmc)
|
||||||
sed -i '/After = mediacenter.service/d' /etc/systemd/system/hyperion.service
|
sed -i '/After = mediacenter.service/d' /etc/systemd/system/hyperion.service
|
||||||
@ -226,15 +271,16 @@ echo 'Please get a new HyperCon version to benefit from the latest features!'
|
|||||||
echo 'Create a new config file, if you encounter problems!'
|
echo 'Create a new config file, if you encounter problems!'
|
||||||
$HINTMESSAGE
|
$HINTMESSAGE
|
||||||
$REBOOTMESSAGE
|
$REBOOTMESSAGE
|
||||||
|
$PWMREBOOTMESSAGE
|
||||||
echo '*******************************************************************************'
|
echo '*******************************************************************************'
|
||||||
## Force reboot and prevent prompt if spi is added during a HyperCon Install
|
## Force reboot and prevent prompt if spi is added during a HyperCon Install
|
||||||
if [ "$1" = "HyperConInstall" ] && [ $CPU_RPI -eq 1 ] && [ $SPIOK -ne 1 ]; then
|
if ( [ "$HCInstall" = "1" ] && [ "$CPU_RPI" = "1" ] ) && ( [ "$SPIOK" = "0" ] || [ "$PWMOK" = "0" ] ); then
|
||||||
echo "Rebooting now, we added dtparam=spi=on to config.txt"
|
echo "Rebooting now, we added dtparam=spi=on and/or dtoverlay=pwm to config.txt"
|
||||||
reboot
|
reboot
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
#Prompt for reboot, if spi added to config.txt
|
#Prompt for reboot, if spi added to config.txt
|
||||||
if [ $CPU_RPI -eq 1 ] && [ $SPIOK -ne 1 ];then
|
if ( [ "$CPU_RPI" = "1" ] ) && ( [ "$SPIOK" = "0" ] || [ "$PWMOK" = "0" ] ); then
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
echo -n "---> Do you want to reboot your Raspberry Pi now? (y or n) :"
|
echo -n "---> Do you want to reboot your Raspberry Pi now? (y or n) :"
|
||||||
|
@ -70,6 +70,7 @@ elif [ $OS_OPENELEC -eq 1 ]; then
|
|||||||
# Remove Hyperion from OpenELEC autostart.sh
|
# Remove Hyperion from OpenELEC autostart.sh
|
||||||
echo "---> Remove Hyperion from OpenELEC autostart.sh"
|
echo "---> Remove Hyperion from OpenELEC autostart.sh"
|
||||||
sed -i "/hyperiond/d" /storage/.config/autostart.sh 2>/dev/null
|
sed -i "/hyperiond/d" /storage/.config/autostart.sh 2>/dev/null
|
||||||
|
sed -i "/hyperion-x11/d" /storage/.config/autostart.sh 2>/dev/null
|
||||||
elif [ $USE_SYSTEMD -eq 1 ]; then
|
elif [ $USE_SYSTEMD -eq 1 ]; then
|
||||||
# Delete and disable Hyperion systemd script
|
# Delete and disable Hyperion systemd script
|
||||||
echo '---> Delete and disable Hyperion systemd script'
|
echo '---> Delete and disable Hyperion systemd script'
|
||||||
|
@ -180,7 +180,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
|||||||
|
|
||||||
device = deviceLightpack;
|
device = deviceLightpack;
|
||||||
}
|
}
|
||||||
else if (type == "multi-lightpack" || type == "multi_lightpack")
|
else if (type == "multi-lightpack")
|
||||||
{
|
{
|
||||||
LedDeviceMultiLightpack* deviceLightpack = new LedDeviceMultiLightpack();
|
LedDeviceMultiLightpack* deviceLightpack = new LedDeviceMultiLightpack();
|
||||||
deviceLightpack->open();
|
deviceLightpack->open();
|
||||||
|
Loading…
Reference in New Issue
Block a user