mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07:00
kobo nia c support
This commit is contained in:
parent
96a95de9e1
commit
8a3f18d703
1 changed files with 9 additions and 0 deletions
|
@ -443,6 +443,15 @@ namespace {
|
|||
batteryLevelInt = batteryLevel.toInt();
|
||||
batteryLevel.append("%");
|
||||
}
|
||||
else {
|
||||
// It's for the Nia model c - but also its a more regular - default path, so make it the fallback
|
||||
QString path = "/sys/class/power_supply/battery/capacity";
|
||||
if(QFile::exists(path)) {
|
||||
batteryLevel = readFile(path).trimmed();
|
||||
batteryLevelInt = batteryLevel.toInt();
|
||||
batteryLevel.append("%");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void writeconfig(std::string file, std::string config) {
|
||||
|
|
Loading…
Reference in a new issue