mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/ion] Clean and shorten LCDData and LCDTiming tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "lcd_data_test_controller.h"
|
||||
#include <apps/shared/post_and_hardware_tests.h>
|
||||
#include <ion/backlight.h>
|
||||
#include <ion/display.h>
|
||||
#include <poincare/print_int.h>
|
||||
|
||||
@@ -22,7 +23,9 @@ bool LCDDataTestController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
void LCDDataTestController::viewWillAppear() {
|
||||
Ion::Backlight::setBrightness(0);
|
||||
runTest();
|
||||
Ion::Backlight::setBrightness(Ion::Backlight::MaxBrightness);
|
||||
}
|
||||
|
||||
LCDDataTestController::ContentView::ContentView() :
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "lcd_timing_test_controller.h"
|
||||
#include <apps/shared/post_and_hardware_tests.h>
|
||||
#include <ion/backlight.h>
|
||||
#include <ion/display.h>
|
||||
#include <poincare/print_int.h>
|
||||
|
||||
@@ -9,7 +10,7 @@ namespace HardwareTest {
|
||||
|
||||
void LCDTimingTestController::runTest() {
|
||||
int pixelFailures = Shared::POSTAndHardwareTests::LCDTimingGlyphFailures();
|
||||
m_testSuccessful = pixelFailures < k_errorLimit;
|
||||
m_testSuccessful = pixelFailures <= k_errorLimit;
|
||||
m_view.setStatus(m_testSuccessful, pixelFailures);
|
||||
}
|
||||
|
||||
@@ -22,7 +23,10 @@ bool LCDTimingTestController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
void LCDTimingTestController::viewWillAppear() {
|
||||
Ion::Display::pushRectUniform(KDRect(KDPointZero, Ion::Display::Width, Ion::Display::Height), KDColorWhite);
|
||||
Ion::Backlight::setBrightness(0);
|
||||
runTest();
|
||||
Ion::Backlight::setBrightness(Ion::Backlight::MaxBrightness);
|
||||
}
|
||||
|
||||
LCDTimingTestController::ContentView::ContentView() :
|
||||
|
||||
@@ -34,7 +34,7 @@ private:
|
||||
BufferTextView m_lcdTimingStateView;
|
||||
BufferTextView m_lcdNumberGlyphFailuresView;
|
||||
};
|
||||
static constexpr int k_errorLimit = 7;
|
||||
static constexpr int k_errorLimit = 1;
|
||||
void runTest();
|
||||
bool m_testSuccessful;
|
||||
ContentView m_view;
|
||||
|
||||
@@ -29,7 +29,7 @@ int POSTAndHardwareTests::LCDDataGlyphFailures() {
|
||||
int POSTAndHardwareTests::LCDTimingGlyphFailures() {
|
||||
Ion::Device::Display::initPanel();
|
||||
int numberOfFailures = 0;
|
||||
for (int i = 0; i < 500; i++) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
Ion::Display::POSTPushMulticolor(k_stampSize);
|
||||
KDColor stamp[k_stampSize*k_stampSize];
|
||||
for (int i = 0; i < 3; i++) { // TODO LEA 1?
|
||||
|
||||
@@ -167,7 +167,7 @@ int displayColoredTilingSize10() {
|
||||
int numberOfHorizontalTiles = Ion::Display::Width / stampSize;
|
||||
int numberOfVerticalTiles = Ion::Display::Height / stampSize;
|
||||
|
||||
constexpr int numberOfPasses = 200;
|
||||
constexpr int numberOfPasses = 150;
|
||||
int numberOfInvalidPixels = 0;
|
||||
|
||||
constexpr int stampHeightPull = 1;
|
||||
|
||||
Reference in New Issue
Block a user