[apps/on_boarding] Fix LED clash between on boarding and exam mode

This commit is contained in:
Léa Saviot
2019-12-11 11:12:00 +01:00
committed by EmilieNumworks
parent 9f592a0bc4
commit 1b7f9cf7b4

View File

@@ -1,5 +1,7 @@
#include "logo_controller.h"
#include "power_on_self_test.h"
#include <apps/apps_container.h>
#include <apps/global_preferences.h>
#include <ion/led.h>
namespace OnBoarding {
@@ -45,6 +47,11 @@ void LogoController::viewWillAppear() {
void LogoController::viewDidDisappear() {
if (m_didPerformTests) {
Ion::LED::setColor(m_previousLEDColor);
/* TODO: instead of setting again the exam mode, put the previous led color
* AND BLINKING.*/
if (GlobalPreferences::sharedGlobalPreferences()->examMode()) {
AppsContainer::sharedAppsContainer()->activateExamMode();
}
}
ViewController::viewDidDisappear();
}