[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.
This commit is contained in:
Gabriel Ozouf
2021-04-16 09:43:29 +02:00
committed by Gabriel
parent 313b5ed222
commit f50f22081c
2 changed files with 4 additions and 5 deletions

View File

@@ -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();

View File

@@ -1,6 +1,5 @@
#include "power_on_self_test.h"
#include <apps/shared/post_and_hardware_tests.h>
#include <ion/board.h>
#include <ion/led.h>
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.