Modem monitor now tracks the modem for state changes and shows the state in the status bar
This commit is contained in:
parent
6951639886
commit
c5c8f3d514
2 changed files with 54 additions and 0 deletions
|
@ -31,6 +31,15 @@ update() {
|
|||
# M symbol if modem monitoring is on & modem present
|
||||
MODEMMON=""
|
||||
pgrep -f sxmo_modemmonitor.sh && MODEMMON=""
|
||||
if [ -n "$MODEMMON" ]; then
|
||||
if [ -f /tmp/modem.locked.state ]; then
|
||||
MODEMMON=""
|
||||
elif [ -f /tmp/modem.registered.state ]; then
|
||||
MODEMMON=""
|
||||
elif [ -f /tmp/modem.connected.state ]; then
|
||||
MODEMMON=""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Battery pct
|
||||
PCT="$(cat /sys/class/power_supply/*-battery/capacity)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue