Hi renda71.
Yes it works
My patch is a patch !
I modify original code using #define
first in file MatrixEsp32Hub75Calc_Impl.h line 627
#define ERIC_H45_PATCH 1
#if (ERIC_H45_PATCH == 1)
#pragma message "ERIC_H45_PATCH == 1"
if (gpioRowAddress ==-1){
v|= ( (BIT_A) | ( BIT_B) | ( BIT_C) | ( BIT_D) | ( BIT_E) );
}
else {
switch (gpioRowAddress % 4){
case 0 : v|= ( (!BIT_A) | ( BIT_B) | ( BIT_C) | ( BIT_D)); break;
case 1 : v|= ( ( BIT_A) | (!BIT_B) | ( BIT_C) | ( BIT_D)); break;
case 2 : v|= ( ( BIT_A) | ( BIT_B) | (!BIT_C) | ( BIT_D)); break;
case 3 : v|= ( ( BIT_A) | ( BIT_B) | ( BIT_C) | (!BIT_D)); break;
}
}
// Serial.print("PATCH: gpioRowAddress=");Serial.print(gpioRowAddress);Serial.print(" / ");Serial.print(gpioRowAddress,BIN);Serial.print(" V= ");Serial.println(v,BIN);
#else
if (gpioRowAddress & 0x01) v|=BIT_A;
if (gpioRowAddress & 0x02) v|=BIT_B;
if (gpioRowAddress & 0x04) v|=BIT_C;
if (gpioRowAddress & 0x08) v|=BIT_D;
if (gpioRowAddress & 0x10) v|=BIT_E;
#endif
then line 946
#if (ERIC_H45_PATCH == 1)
#pragma message "ERIC_H45_PATCH == 1"
if (gpioRowAddress ==-1){
v|= ( (BIT_A) | ( BIT_B) | ( BIT_C) | ( BIT_D) | ( BIT_E) );
}
else {
switch (gpioRowAddress % 4){
case 0 : v|= ( (!BIT_A) | ( BIT_B) | ( BIT_C) | ( BIT_D)); break;
case 1 : v|= ( ( BIT_A) | (!BIT_B) | ( BIT_C) | ( BIT_D)); break;
case 2 : v|= ( ( BIT_A) | ( BIT_B) | (!BIT_C) | ( BIT_D)); break;
case 3 : v|= ( ( BIT_A) | ( BIT_B) | ( BIT_C) | (!BIT_D)); break;
}
}
// Serial.print("PATCH: gpioRowAddress=");Serial.print(gpioRowAddress);Serial.print(" / ");Serial.print(gpioRowAddress,BIN);Serial.print(" V= ");Serial.println(v,BIN);
#else
if (gpioRowAddress & 0x01) v|=BIT_A;
if (gpioRowAddress & 0x02) v|=BIT_B;
if (gpioRowAddress & 0x04) v|=BIT_C;
if (gpioRowAddress & 0x08) v|=BIT_D;
if (gpioRowAddress & 0x10) v|=BIT_E;
#endif
That’s all for this file.
Now maping:
in MatrixCommonHub75.h
I define a new variant of SM_PANELTYPE_HUB75_16ROW_32COL_MOD4SCAN_V3 :, SMARTMATRIX_HUB75_16ROW_32COL_MOD4SCAN_V3:
#define SM_PANELTYPE_HUB75_16ROW_32COL_MOD4SCAN_V4 13
#define SMARTMATRIX_HUB75_16ROW_32COL_MOD4SCAN_V4 SM_PANELTYPE_HUB75_16ROW_32COL_MOD4SCAN_V4
and duplicate it in all the file.
in MatrixPanelMaps.cpp the new mapping:
const PanelMappingEntry panelMap32x16Mod4V4[] =
{
{0, 7, -8},
{0, 23, -8},
{0, 39, -8},
{0, 55, -8},
{4, 8, 8},
{4, 24, 8},
{4, 40, 8},
{4, 56, 8},
{0, 0, 0} // last entry is all zeros
};
and at the end of the file in the switch (paneltype) add
case SMARTMATRIX_HUB75_16ROW_32COL_MOD4SCAN_V4:
return panelMap32x16Mod4V4;
it will be nice to replace #define with a runtime option of course.
hope this help.
Best regards
Eric