Add missing statuses

This commit is contained in:
Matti Viljanen 2020-03-20 20:49:28 +02:00
parent fecaad492a
commit 799ecd40db
No known key found for this signature in database
GPG key ID: CF32A1495158F888
2 changed files with 3 additions and 1 deletions

View file

@ -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")
}

View file

@ -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");