Add not discharging battery state
This commit is contained in:
parent
8020610e2c
commit
e4e93df5d6
1 changed files with 4 additions and 1 deletions
|
@ -11,9 +11,10 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
batteryStateFull = "FULL"
|
||||
batteryStateFull = "FUL" // "full"
|
||||
batteryStateDischarging = "BAT"
|
||||
batteryStateCharging = "CHR"
|
||||
batteryStateNotCharging = "HLD" // for "hold" - present when charge threshold set
|
||||
batteryStateUnknown = "UNK"
|
||||
)
|
||||
|
||||
|
@ -103,6 +104,8 @@ func (g *Battery) getState() (string, error) {
|
|||
x = batteryStateDischarging
|
||||
case "Charging":
|
||||
x = batteryStateCharging
|
||||
case "Not charging":
|
||||
x = batteryStateNotCharging
|
||||
case "Unknown":
|
||||
fallthrough
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue