From 96c63bd4a53dc438fcd7332bd0d353c2c809f968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Thu, 19 Dec 2019 15:10:32 +0100 Subject: [PATCH] [apps][ion] Yellow LED is equivalent to Dutch exam mode, do not update the LED color (with plugging/charging events) if the displayed color was Red or Yellow --- apps/apps_container.cpp | 2 +- ion/src/device/n0110/drivers/led.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index 952f83db3..8d96b2b02 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -327,7 +327,7 @@ void AppsContainer::redrawWindow() { void AppsContainer::activateExamMode(GlobalPreferences::ExamMode examMode) { assert(examMode == GlobalPreferences::ExamMode::Standard || examMode == GlobalPreferences::ExamMode::Dutch); reset(); - Ion::LED::setColor(examMode == GlobalPreferences::ExamMode::Dutch ? KDColorOrange : KDColorRed); + Ion::LED::setColor(examMode == GlobalPreferences::ExamMode::Dutch ? KDColorYellow : KDColorRed); Ion::LED::setBlinking(1000, 0.1f); } diff --git a/ion/src/device/n0110/drivers/led.cpp b/ion/src/device/n0110/drivers/led.cpp index d29cc8494..83cf62083 100644 --- a/ion/src/device/n0110/drivers/led.cpp +++ b/ion/src/device/n0110/drivers/led.cpp @@ -7,7 +7,7 @@ namespace LED { KDColor updateColorWithPlugAndCharge() { KDColor ledColor = getColor(); - if (ledColor != KDColorRed) { // If exam mode is on, we do not update the LED with the plugged/charging state + if (ledColor != KDColorRed && ledColor != KDColorYellow) { // If exam mode is on, we do not update the LED with the plugged/charging state if (USB::isPlugged()) { ledColor = Battery::isCharging() ? KDColorOrange : KDColorGreen; } else {