[hardware_test] Add comments on LCD data test

This commit is contained in:
Léa Saviot
2019-04-12 15:59:07 +02:00
parent a77f5173b1
commit 253833d7e9
2 changed files with 13 additions and 2 deletions

View File

@@ -34,12 +34,12 @@ void LCDDataTestController::ContentView::layoutSubviews() {
m_lcdDataStateView.setFrame(KDRect(0, 0, Ion::Display::Width, Ion::Display::Height));
}
void colorPixelBuffer(KDColor * pixels, int numberOfPixels, KDColor c) {
for (int i = 0; i < numberOfPixels; i++) {
pixels[i] = c;
}
}
bool LCDDataTestController::test() {
KDColor testColors[] = {
KDColorRed, KDColorGreen, KDColorBlue,
@@ -62,7 +62,7 @@ bool LCDDataTestController::testDisplayColor(KDColor c) {
KDColor stamp[stampWidth*stampHeight];
// Test with pushRect
// Tiling test with pushRect
colorPixelBuffer(stamp, stampWidth * stampHeight, c);
for (int i = 0; i < Ion::Display::Width / stampWidth; i++) {
for (int j = 0; j < Ion::Display::Height / stampHeight; j++) {

View File

@@ -7,6 +7,17 @@
namespace HardwareTest {
class LCDDataTestController : public ViewController {
/* There are three types of tests, where a pattern is pushed to the screen and
* the number of invalid pixels then counted.
* - Test 1: Tile the screen with color patches. Tiling increases the number
* of border mistakes.
* - Test 2: Push one color to the whole screen in one step. It shows errors
* that appear on large and fast pushes.
* - Test 3: Color the screen by alterning one pixel black and one pixel
* white (maximal data difference), at maximal data writing speed.
* Tests 1 and 2 are done for a few different colors. */
public:
LCDDataTestController(Responder * parentResponder) :
ViewController(parentResponder),