pixelmatix / SmartMatrix

SmartMatrix Library for Teensy 3, Teensy 4, and ESP32
http://docs.pixelmatix.com/SmartMatrix
611 stars 161 forks source link

How do you actually draw MultiRowRefreshMapping ? It makes no sense #80

Closed GeorgeFlorian closed 5 years ago

GeorgeFlorian commented 5 years ago

Hello !

I am using a P10 32x16 LED panel that either has 1/4 or 1/2 scan pattern.

My question is how is MultiRowRefreshMapping supposed to work ?

I used only A,B and C while D and E are set to ground. Although, it behaves exactly the same when connecting D and also when connecting D and E together. It's a strange panel.

Here is a video with it working: https://youtu.be/9FbKjUr0dHc

Here is the code for what you see in the video:

#if (SKETCH_MODE == MODE_MAP_REVERSE_ENGINEERING)
const uint8_t kMatrixWidth = 128;        // (32*16)/4 = 128
const uint8_t kMatrixHeight = 4;       // 1/2 scan pattern
const uint8_t kPanelType = SMARTMATRIX_HUB75_4ROW_MOD2SCAN;   // Use this to reverse engineer mapping for a MOD2 panel
#endif

A strange behavior I've noticed is that on the left side of the panel (first 2 columns. 1 column = 8 pixel width) it fills 2 pixels at a time and on the right half (last 2 columns) it fills 1 pixel at a time.

Also, I've put backgroundLayer.fillScreen({0,0,0}); outside the fors to see how it fills up.

Using the following code fills up the whole display with colors:

#if (SKETCH_MODE == MODE_MAP_REVERSE_ENGINEERING)
const uint8_t kMatrixWidth = 64;        // (32*16)/8 = 64
const uint8_t kMatrixHeight = 8;       //  1/4 scan pattern
const uint8_t kPanelType = SMARTMATRIX_HUB75_8ROW_MOD4SCAN;   // Use this to reverse engineer mapping for a MOD4 panel
#endif

I don't know which one should be the one to start drawing {rowOffset, pixelOffset, numPixels/direction}.

In the photo example you've drawn only the 0,2,4 and 6 row. As you can see in my video, my panel fills rows: 0,1,4,5,8,9,12,13.

There's also the case when it fills all the rows. How the hell do I number that out ? (32*16)/8 = 64. What can I do with 64 when all the rows are filled up ?