rework
parent
d6ec9ee7e9
commit
a2c9d41c71
|
|
@ -39,7 +39,11 @@ function shutdownCommand() {
|
||||||
# @return ... 0,1 as return value
|
# @return ... 0,1 as return value
|
||||||
function isBatteryAvailable() {
|
function isBatteryAvailable() {
|
||||||
local flags=$(i2cget -f -y 0 0x34 0x01)
|
local flags=$(i2cget -f -y 0 0x34 0x01)
|
||||||
return $(((( $flags&0x20 ) >>5 ) == $TRUE ))
|
if (((( $flags&0x20 ) >>5 ) == $TRUE )); then
|
||||||
|
echo "1"
|
||||||
|
else
|
||||||
|
echo "0"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# @return ... voltage as string
|
# @return ... voltage as string
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue