[apps/POSTAndHWTest] LCDTest: Remove invalid pixels count limit

This commit is contained in:
Léa Saviot
2019-05-28 15:20:26 +02:00
parent ad85f01c1e
commit 1980b1a9d1
2 changed files with 1 additions and 6 deletions

View File

@@ -45,7 +45,6 @@ bool POSTAndHardwareTests::LCDDataOK() {
for (int iteration = 0; iteration < k_numberOfTilingLCDIterations; iteration++) {
Ion::Display::POSTPushMulticolor(iteration, k_stampSize);
KDColor stamp[k_stampSize*k_stampSize];
int numberOfInvalidPixels = 0;
for (int i = 0; i < Ion::Display::Width / k_stampSize; i++) {
for (int j = 0; j < Ion::Display::Height / k_stampSize; j++) {
Ion::Display::pullRect(KDRect(i * k_stampSize, j * k_stampSize, k_stampSize, k_stampSize), stamp);
@@ -53,10 +52,7 @@ bool POSTAndHardwareTests::LCDDataOK() {
uint16_t color = (uint16_t)(1 << shift);
for (int k = 0; k < k_stampSize*k_stampSize; k++) {
if (stamp[k] != color) {
numberOfInvalidPixels++;
if (numberOfInvalidPixels > k_invalidPixelsLimit) {
return false;
}
return false;
}
color ^= 0xFFFF;
}

View File

@@ -22,7 +22,6 @@ public:
static bool LCDDataOK();
private:
constexpr static int k_stampSize = 8;
constexpr static int k_invalidPixelsLimit = 2;
constexpr static int k_numberOfTilingLCDIterations = 20;
static_assert(Ion::Display::Width % k_stampSize == 0, "Stamps must tesselate the display");
static_assert(Ion::Display::Height % k_stampSize == 0, "Stamps must tesselate the display");