Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Battery
#11
@Jole:
EDIT the "/opt/retropie/configs/all/autostart.sh".
See:
Code:
#!/bin/bash
stty -echo
SERVICE='fbi'
      if ps ax | grep $SERVICE > /dev/null
  then
      sudo killall -q $SERVICE
      fi
while pgrep mpv &>/dev/null;
do sleep 1;
done

#display battery status for 5 sec before ES start
BATTERY_PACK=$(cat /sys/class/power_supply/axp20x-battery/capacity)
BATTERY_STATUS=$(cat /sys/class/power_supply/axp20x-battery/status)
convert /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery_background.jpg -gravity center -font FreeSans \
    -pointsize 60 -stroke '#000C' -strokewidth 4 -annotate 0 "battery status: $BATTERY_PACK%\n$BATTERY_STATUS" -undercolor '#00000080' \
    -stroke  none -fill white -annotate 0 "battery status: $BATTERY_PACK%\n$BATTERY_STATUS" /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery.jpg
fbi -a -noverbose -t 5 --once /home/pi/RetroPie/retropiemenu/RetrOrangePi/battery.jpg
if ps ax | grep $SERVICE > /dev/null
    then sudo killall -q $SERVICE
fi
#end of display battery status

sudo rmmod brcmfmac;
pulseaudio --start;
python /home/pi/RetrOrangePi/Background_Music/bgmusic.py &
/opt/retropie/supplementary/emulationstation/emulationstation.sh;
stty echo;
sudo pkill -f bgmusic.py


this show you the battery status for 5 sec. because no buttons work in this bootlevel
dont forget to copy the picture in last post "battery_background.jpg" in your "/home/pi/RetroPie/retropiemenu/RetrOrangePi/" folder
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Low battery led always ON MedioPollo30 3 776 04-08-2020, 08:25 AM
Last Post: Jackie Lee

Forum Jump:


Users browsing this thread: 1 Guest(s)