#474 add hardware test to debug and main menu

This commit is contained in:
Christian Rotzoll 2019-04-10 14:50:24 +01:00
parent 6ecb87a74b
commit 0a15c876a7
3 changed files with 24 additions and 1 deletions

View File

@ -373,6 +373,7 @@ else
fi
# final Options
OPTIONS+=(HARDWARE "Run Hardwaretest")
OPTIONS+=(OFF "PowerOff RaspiBlitz")
OPTIONS+=(X "Console / Terminal")
@ -517,6 +518,10 @@ case $CHOICE in
./00mainMenu.sh
fi
;;
HARDWARE)
sudo ./05hardwareTest.sh
./00mainMenu.sh
;;
PASSWORD)
sudo /home/admin/config.scripts/blitz.setpassword.sh
noreboot=$?

View File

@ -9,6 +9,7 @@
# INFOFILE - state data from bootstrap
source /home/admin/raspiblitz.info
clear
echo "*** Hardware Test Report ***"
echo ""

View File

@ -75,8 +75,25 @@ fi
echo ""
echo "*** HARDWARE TEST RESULTS ***"
echo "UndervoltageReports in Logs: ${undervoltageReports}"
showImproveInfo=0
if [ ${#undervoltageReports} -gt 0 ]; then
echo "UndervoltageReports in Logs: ${undervoltageReports}"
if [ ${undervoltageReports} -gt 0 ]; then
showImproveInfo=1
fi
fi
if [ -f /home/admin/stresstest.report ]; then
sudo cat /home/admin/stresstest.report
source /home/admin/stresstest.report
if [ ${powerWARN} -gt 0 ]; then
showImproveInfo=1
fi
if [ ${tempWARN} -gt 0 ]; then
showImproveInfo=1
fi
fi
if [ ${showImproveInfo} -gt 0 ]; then
echo "IMPORTANT: There are some hardware issues with your setup."
echo "'Run Hardwaretest' in main menu or: sudo /home/admin/05hardwareTest.sh"
fi
echo ""