Add missing statuses
This commit is contained in:
parent
fecaad492a
commit
799ecd40db
2 changed files with 3 additions and 1 deletions
|
@ -25,6 +25,8 @@ Page {
|
|||
"idle": qsTr("idle", "Charger plugged in, not using nor charging battery"),
|
||||
"discharging": qsTr("discharging", "Charger not plugged in, battery discharging"),
|
||||
"charging": qsTr("charging", "Charger plugged in and battery charging"),
|
||||
"full": qsTr("full", "Battery fully charged"),
|
||||
"empty": qsTr("empty", "Battery fully depleted"),
|
||||
"unknown": qsTr("unknown", "Battery not detected, or faulty, or something")
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Battery::Battery(QObject* parent) : QObject(parent)
|
|||
{
|
||||
// Number: meaning percentage, e.g. 42
|
||||
chargeFile = new QFile("/sys/class/power_supply/battery/capacity", this);
|
||||
// String: charging, discharging, (empty), unknown (others?)
|
||||
// String: charging, discharging, full, empty, unknown (others?)
|
||||
stateFile = new QFile("/sys/class/power_supply/battery/status", this);
|
||||
// Number: 0 or 1
|
||||
chargerConnectedFile = new QFile("/sys/class/power_supply/usb/present");
|
||||
|
|
Loading…
Reference in a new issue