@@ -812,14 +812,15 @@ BusHub75Matrix::BusHub75Matrix(const BusConfig &bc) : Bus(bc.type, bc.start, bc.
812812 virtualDisp = nullptr ;
813813
814814 if (bc.type == TYPE_HUB75MATRIX_HS) {
815- mxconfig.mx_width = min ((u_int8_t ) 64 , bc.pins [0 ]);
816- mxconfig.mx_height = min ((u_int8_t ) 64 , bc.pins [1 ]);
817- if (bc.pins [2 ] > 1 && bc.pins [3 ] > 0 && bc.pins [4 ]) {
818- virtualDisp = new VirtualMatrixPanel ((*display), bc.pins [3 ], bc.pins [4 ], mxconfig.mx_width , mxconfig.mx_height , CHAIN_BOTTOM_LEFT_UP);
819- }
815+ mxconfig.mx_width = min ((uint8_t ) 64 , bc.pins [0 ]);
816+ mxconfig.mx_height = min ((uint8_t ) 64 , bc.pins [1 ]);
817+ // Disable chains of panels for now, incomplete UI changes
818+ // if(bc.pins[2] > 1 && bc.pins[3] != 0 && bc.pins[4] != 0 && bc.pins[3] != 255 && bc.pins[4] != 255) {
819+ // virtualDisp = new VirtualMatrixPanel((*display), bc.pins[3], bc.pins[4], mxconfig.mx_width, mxconfig.mx_height, CHAIN_BOTTOM_LEFT_UP);
820+ // }
820821 } else if (bc.type == TYPE_HUB75MATRIX_QS) {
821- mxconfig.mx_width = min ((u_int8_t ) 64 , bc.pins [0 ]) * 2 ;
822- mxconfig.mx_height = min ((u_int8_t ) 64 , bc.pins [1 ]) / 2 ;
822+ mxconfig.mx_width = min ((uint8_t ) 64 , bc.pins [0 ]) * 2 ;
823+ mxconfig.mx_height = min ((uint8_t ) 64 , bc.pins [1 ]) / 2 ;
823824 virtualDisp = new VirtualMatrixPanel ((*display), 1 , 1 , bc.pins [0 ], bc.pins [1 ]);
824825 virtualDisp->setRotation (0 );
825826 switch (bc.pins [1 ]) {
@@ -849,7 +850,7 @@ BusHub75Matrix::BusHub75Matrix(const BusConfig &bc) : Bus(bc.type, bc.start, bc.
849850 } else mxconfig.setPixelColorDepthBits (8 );
850851#endif
851852
852- mxconfig.chain_length = max ((u_int8_t ) 1 , min (bc.pins [2 ], (u_int8_t ) 4 )); // prevent bad data preventing boot due to low memory
853+ mxconfig.chain_length = max ((uint8_t ) 1 , min (bc.pins [2 ], (uint8_t ) 4 )); // prevent bad data preventing boot due to low memory
853854
854855 if (mxconfig.mx_height >= 64 && (mxconfig.chain_length > 1 )) {
855856 DEBUGBUS_PRINTLN (" WARNING, only single panel can be used of 64 pixel boards due to memory" );
@@ -996,7 +997,6 @@ BusHub75Matrix::BusHub75Matrix(const BusConfig &bc) : Bus(bc.type, bc.start, bc.
996997 DEBUGBUS_PRINT (F (" MatrixPanel_I2S_DMA " ));
997998 DEBUGBUS_PRINTF (" %sstarted, width=%u, %u pixels.\n " , _valid? " " :" not " , _panelWidth, _len);
998999
999- if (mxconfig.double_buff == true ) DEBUGBUS_PRINTLN (F (" MatrixPanel_I2S_DMA driver native double-buffering enabled." ));
10001000 if (_ledBuffer != nullptr ) DEBUGBUS_PRINTLN (F (" MatrixPanel_I2S_DMA LEDS buffer enabled." ));
10011001 if (_ledsDirty != nullptr ) DEBUGBUS_PRINTLN (F (" MatrixPanel_I2S_DMA LEDS dirty bit optimization enabled." ));
10021002 if ((_ledBuffer != nullptr ) || (_ledsDirty != nullptr )) {
@@ -1021,9 +1021,6 @@ void __attribute__((hot)) BusHub75Matrix::setPixelColor(unsigned pix, uint32_t c
10211021 if ((c == IS_BLACK) && (getBitFromArray (_ledsDirty, pix) == false )) return ; // ignore black if pixel is already black
10221022 setBitInArray (_ledsDirty, pix, c != IS_BLACK); // dirty = true means "color is not BLACK"
10231023
1024- #ifndef NO_CIE1931
1025- c = unGamma24 (c); // to use the driver linear brightness feature, we first need to undo WLED gamma correction
1026- #endif
10271024 uint8_t r = R (c);
10281025 uint8_t g = G (c);
10291026 uint8_t b = B (c);
@@ -1069,9 +1066,6 @@ void BusHub75Matrix::show(void) {
10691066 for (int y=0 ; y<height; y++) for (int x=0 ; x<width; x++) {
10701067 if (getBitFromArray (_ledsDirty, pix) == true ) { // only repaint the "dirty" pixels
10711068 uint32_t c = uint32_t (_ledBuffer[pix]) & 0x00FFFFFF ; // get RGB color, removing FastLED "alpha" component
1072- #ifndef NO_CIE1931
1073- c = unGamma24 (c); // to use the driver linear brightness feature, we first need to undo WLED gamma correction
1074- #endif
10751069 uint8_t r = R (c);
10761070 uint8_t g = G (c);
10771071 uint8_t b = B (c);
@@ -1082,13 +1076,6 @@ void BusHub75Matrix::show(void) {
10821076 }
10831077 setBitArray (_ledsDirty, _len, false ); // buffer shown - reset all dirty bits
10841078 }
1085-
1086- if (mxconfig.double_buff ) {
1087- display->flipDMABuffer (); // Show the back buffer, set current output buffer to the back (i.e. no longer being sent to LED panels)
1088- // while(!previousBufferFree) delay(1); // experimental - Wait before we allow any writing to the buffer. Stop flicker.
1089- display->clearScreen (); // Now clear the back-buffer
1090- setBitArray (_ledsDirty, _len, false ); // dislay buffer is blank - reset all dirty bits
1091- }
10921079}
10931080
10941081void BusHub75Matrix::cleanup () {
0 commit comments