Wileyfox Swift battery level icon fix

Signed-off-by: Anjandev Momi <anjan@momi.ca>
master
Alex O 4 years ago committed by Anjandev Momi
parent 51815acb0a
commit b2fad74052
  1. 6
      scripts/core/sxmo_statusbar.sh
  2. 3
      scripts/deviceprofiles/sxmo_deviceprofile_l8150qcom.sh

@ -54,10 +54,10 @@ update() {
fi fi
# Battery pct # Battery pct
PCT="$(cat /sys/class/power_supply/*-battery/capacity)" BATTERY_DEVICE="${BATTERY_DEVICE:-"/sys/class/power_supply/*-battery"}"
PCT="$(cat "$BATTERY_DEVICE"/capacity)"
BATSTATUS="$( BATSTATUS="$(
cat /sys/class/power_supply/*-battery/status | cut -c1 "$BATTERY_DEVICE"/status
cut -c1
)" )"
if [ "$BATSTATUS" = "C" ]; then if [ "$BATSTATUS" = "C" ]; then
if [ "$PCT" -lt 20 ]; then if [ "$PCT" -lt 20 ]; then

@ -0,0 +1,3 @@
#!/bin/sh
export BATTERY_DEVICE="/sys/class/power_supply/pm8916-bms-vm"
Loading…
Cancel
Save