From 795bf64188bdbf61c8da8f6f98aa7408de9f5a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Wed, 22 May 2019 16:26:56 +0200 Subject: [PATCH] [apps/apps_container] Switch of LED if low battery if no exam mode --- apps/apps_container.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index 79f1c10f1..f9b153274 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -329,6 +329,12 @@ void AppsContainer::shutdownDueToLowBattery() { } while (Ion::Battery::level() == Ion::Battery::Charge::EMPTY) { Ion::Backlight::setBrightness(0); + if (GlobalPreferences::sharedGlobalPreferences()->examMode() == GlobalPreferences::ExamMode::Deactivate) { + /* Unless the LED is lit up for the exam mode, switch off the LED. IF the + * low battery event happened during the Power-On Self-Test, a LED might + * have stayed lit up. */ + Ion::LED::setColor(KDColorBlack); + } m_emptyBatteryWindow.redraw(true); Ion::Timing::msleep(3000); Ion::Power::suspend();