From f50f22081c861173fda78c492a5f4ff07a817748 Mon Sep 17 00:00:00 2001 From: Gabriel Ozouf Date: Fri, 16 Apr 2021 09:43:29 +0200 Subject: [PATCH] [apps/main] Move lockUnlockedPCBVersion to ion_main Although we always include the on-boarding when releasing a firmware, moving this method here costs nothing and prevents mistakes if we ever decide to remove on-boarding. --- apps/main.cpp | 4 ++++ apps/on_boarding/power_on_self_test.cpp | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/main.cpp b/apps/main.cpp index bb8776af0..fc42b75bd 100644 --- a/apps/main.cpp +++ b/apps/main.cpp @@ -19,6 +19,10 @@ void ion_main(int argc, const char * const argv[]) { #else void ion_main(int argc, const char * const argv[]) { + /* Lock OTP on older devices to prevent garbage being written where the PCB + * version is read. */ + Ion::Board::lockUnlockedPCBVersion(); + // Initialize Poincare::TreePool::sharedPool Poincare::Init(); diff --git a/apps/on_boarding/power_on_self_test.cpp b/apps/on_boarding/power_on_self_test.cpp index 85d4378cd..5bdeb1807 100644 --- a/apps/on_boarding/power_on_self_test.cpp +++ b/apps/on_boarding/power_on_self_test.cpp @@ -1,6 +1,5 @@ #include "power_on_self_test.h" #include -#include #include namespace OnBoarding { @@ -9,10 +8,6 @@ KDColor PowerOnSelfTest::Perform() { KDColor previousLEDColor = Ion::LED::getColor(); KDColor resultColor = KDColorWhite; - /* Lock OTP on older devices to prevent garbage being written where the PCB - * version is read. */ - Ion::Board::lockUnlockedPCBVersion(); - // Screen tests bool screenTestsOK = Shared::POSTAndHardwareTests::VBlankOK() && (Shared::POSTAndHardwareTests::TextLCDGlyphFailures() <= k_textErrorsLimit); // We push a white screen so that the LCD Data test is invisible for the user.