diff --git a/applications/system-service/powerapi.cpp b/applications/system-service/powerapi.cpp index 24e91f99..95cecea5 100644 --- a/applications/system-service/powerapi.cpp +++ b/applications/system-service/powerapi.cpp @@ -1,5 +1,7 @@ #include "powerapi.h" +#include + PowerAPI* PowerAPI::singleton(PowerAPI* self){ static PowerAPI* instance; if(self != nullptr){ @@ -23,8 +25,8 @@ PowerAPI::PowerAPI(QObject* parent) }); Oxide::Sentry::sentry_span(t, "monitor", "Setup monitor", [this]{ if(deviceSettings.getDeviceType() == Oxide::DeviceSettings::RM1){ - UDev::singleton()->addMonitor("platform", NULL); - UDev::singleton()->subsystem("power_supply", [this]{ + Oxide::UDev::singleton()->addMonitor("platform", NULL); + Oxide::UDev::singleton()->subsystem("power_supply", [this]{ update(); }); }else{ @@ -46,19 +48,19 @@ PowerAPI::~PowerAPI(){ delete timer; }else{ qDebug() << "Killing UDev monitor"; - UDev::singleton()->stop(); + Oxide::UDev::singleton()->stop(); } } void PowerAPI::setEnabled(bool enabled) { if(enabled){ if(deviceSettings.getDeviceType() == Oxide::DeviceSettings::RM1){ - UDev::singleton()->start(); + Oxide::UDev::singleton()->start(); }else{ timer->start(); } }else if(deviceSettings.getDeviceType() == Oxide::DeviceSettings::RM1){ - UDev::singleton()->stop(); + Oxide::UDev::singleton()->stop(); }else{ timer->stop(); } diff --git a/applications/system-service/powerapi.h b/applications/system-service/powerapi.h index 508b241e..67ec1711 100644 --- a/applications/system-service/powerapi.h +++ b/applications/system-service/powerapi.h @@ -2,7 +2,6 @@ #define BATTERYAPI_H #include -#include #include #include