mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
16 lines
331 B
C++
16 lines
331 B
C++
#include "battery_timer.h"
|
|
#include "apps_container.h"
|
|
|
|
BatteryTimer::BatteryTimer(AppsContainer * container) :
|
|
Timer(5),
|
|
m_container(container)
|
|
{
|
|
}
|
|
|
|
void BatteryTimer::fire() {
|
|
m_container->updateBatteryState();
|
|
if (Ion::Battery::level() == Ion::Battery::Charge::EMPTY) {
|
|
m_container->shutdownDueToLowBattery();
|
|
}
|
|
}
|