mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-27 16:17:21 -08:00
Tell shell scripts that we're running
This commit is contained in:
parent
08b8951750
commit
01ee2eaf87
2 changed files with 11 additions and 2 deletions
3
main.cpp
3
main.cpp
|
@ -30,6 +30,9 @@
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
// Tell scripts that we're currently running
|
||||||
|
string_writeconfig("/tmp/inkbox_running", "true");
|
||||||
|
|
||||||
// Checking if battery level is critical; if true (and if it is not charging), then display a "Please charge your eReader" splash and power off.
|
// Checking if battery level is critical; if true (and if it is not charging), then display a "Please charge your eReader" splash and power off.
|
||||||
if(isBatteryCritical() == true) {
|
if(isBatteryCritical() == true) {
|
||||||
string_checkconfig_ro("/sys/devices/platform/pmic_battery.1/power_supply/mc13892_bat/status");
|
string_checkconfig_ro("/sys/devices/platform/pmic_battery.1/power_supply/mc13892_bat/status");
|
||||||
|
|
|
@ -275,8 +275,14 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(isBatteryCritical() == true) {
|
if(isBatteryCritical() == true) {
|
||||||
qDebug() << "Warning! Battery is at a critical charge level!";
|
string_checkconfig_ro("/sys/devices/platform/pmic_battery.1/power_supply/mc13892_bat/status");
|
||||||
openCriticalBatteryAlertWindow();
|
if(checkconfig_str_val == "Charging\n") {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
qDebug() << "Warning! Battery is at a critical charge level!";
|
||||||
|
openCriticalBatteryAlertWindow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue