Skip to content

Commit 5123128

Browse files
committed
Limit hub75 chain length by height 64 not width to allow for 2 x 64x32
1 parent 528ec1f commit 5123128

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

wled00/bus_manager.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,9 +518,7 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh
518518
break;
519519
}
520520

521-
mxconfig.chain_length = max((u_int8_t) 1, min(bc.pins[0], (u_int8_t) 4)); // prevent bad data preventing boot due to low memory
522-
523-
if(mxconfig.mx_width >= 64 && (bc.pins[0] > 1)) {
521+
if(mxconfig.mx_height >= 64 && (bc.pins[0] > 1)) {
524522
USER_PRINT("WARNING, only single panel can be used of 64 pixel boards due to memory")
525523
mxconfig.chain_length = 1;
526524
}
@@ -609,6 +607,7 @@ BusHub75Matrix::BusHub75Matrix(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWh
609607

610608
#endif
611609

610+
mxconfig.chain_length = max((u_int8_t) 1, min(bc.pins[0], (u_int8_t) 4)); // prevent bad data preventing boot due to low memory
612611

613612
USER_PRINTF("MatrixPanel_I2S_DMA config - %ux%u length: %u\n", mxconfig.mx_width, mxconfig.mx_height, mxconfig.chain_length);
614613

0 commit comments

Comments
 (0)