mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-12 23:58:50 +01:00
move current_battery_percentage file to /tmp
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
parent
fd6ab2ce4c
commit
7c8da14252
@ -50,7 +50,7 @@ videoLoop = 0
|
||||
#######################################
|
||||
fileUsbConnected = /sys/class/power_supply/axp20x-usb/present
|
||||
#fileBatCapacity = /sys/class/power_supply/axp20x-battery/capacity
|
||||
fileBatCapacity = /etc/current_battery_percentage
|
||||
fileBatCapacity = /tmp/current_battery_percentage
|
||||
fileBatConnected = /sys/class/power_supply/axp20x-battery/present
|
||||
|
||||
#######################################
|
||||
|
||||
@ -14,10 +14,12 @@ LOW_BAT_SECS_NOT_DISPLAYED=5
|
||||
|
||||
# Files and commands declaration
|
||||
USB_PRESENT_FILE=/sys/class/power_supply/axp20x-usb/present
|
||||
#USB_PRESENT_FILE=/sys/class/power_supply/axp20x-ac/present # Cheat for no USB present simulation when debugging
|
||||
|
||||
# Cheat for no USB present simulation when debugging
|
||||
#USB_PRESENT_FILE=/sys/class/power_supply/axp20x-ac/present
|
||||
BAT_PRESENT_FILE=/sys/class/power_supply/axp20x-battery/present
|
||||
BAT_PERCENT_FILE=/sys/class/power_supply/axp20x-battery/capacity
|
||||
BAT_PERCENT_RESCALED_FILE=/etc/current_battery_percentage
|
||||
BAT_PERCENT_RESCALED_FILE=/tmp/current_battery_percentage
|
||||
LOW_BAT_ICON=/sys/class/graphics/fb0/low_battery
|
||||
SCHEDULE_SHUTDOWN_CMD=sched_shutdown
|
||||
SIGNAL_URS1_TO_EMULATORS_CMD=signal_usr1_to_emulators
|
||||
@ -50,7 +52,9 @@ while true; do
|
||||
#echo "bat_percent_rescaled_maxed = ${bat_percent_rescaled_maxed}"
|
||||
|
||||
# Save in file
|
||||
rw
|
||||
echo ${bat_percent_rescaled_maxed} > ${BAT_PERCENT_RESCALED_FILE}
|
||||
ro
|
||||
|
||||
# Low bat status detection
|
||||
if [ "$(cat ${USB_PRESENT_FILE})" -eq "0" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user