Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes improvements in the AC-HUB75 back #169

Draft
wants to merge 7 commits into
base: mdev
Choose a base branch
from

Conversation

netmindz
Copy link
Collaborator

Bring the changes done for the cleanup as part of 0_15 and AC back into MM

@softhack007
Copy link
Collaborator

softhack007 commented Oct 11, 2024

Looks good 👍 I'll test it over the weekend, and then merge into mdev.

Two questions:

  • any changes needed to settings_leds.htm? So users can actually set "reverse" (clock phase) and "color order"?
  • do we need color order GRB) as an option? I always thought these panels are always RGB (and matching the labeling of the HUB75e plug)?

Also it looks like there can be only one HUB75 bus ... not sure if there is a way to prevent users from creating more than one HUB75? Maybe this needs to be taken care of in settings_leds.htm ?

@@ -450,6 +450,12 @@ bool PinManagerClass::allocateMultiplePins(const managed_pin_type * mptArray, by
return true;
}

bool PinManagerClass::allocateMultiplePins(const uint8_t * mptArray, byte arrayElementCount, PinOwner tag, boolean output) {
PinManagerPinType pins[arrayElementCount];
for (int i=0; i<arrayElementCount; i++) pins[i] = {mptArray[i], output};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my compiler doesn't like this line.

wled00/pin_manager.cpp: In member function 'bool PinManagerClass::allocateMultiplePins(const uint8_t*, byte, PinOwner, boolean)':
wled00/pin_manager.cpp:456:64: warning: narrowing conversion of '(uint8_t)(*(mptArray + ((sizetype)i)))' from 'uint8_t' {aka 'unsigned char'} to 'int8_t' {aka 'signed char'} inside { } [-Wnarrowing]
   for (int i=0; i<arrayElementCount; i++) pins[i] = {mptArray[i], output};
                                                      ~~~~~~~~~~^

might be worth to add an explicit cast to int8_t :

for (int i=0; i<arrayElementCount; i++) pins[i] = {int8_t(mptArray[i]), output};

DEBUG_PRINTF("MatrixPanel_I2S_DMA = unsupported color order %u\n", bc.colorOrder);
}

DEBUG_PRINTF("MatrixPanel_I2S_DMA config - %ux%u length: %u\n", mxconfig.mx_width, mxconfig.mx_height, mxconfig.chain_length);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate (see line 745)

}

DEBUG_PRINTF("MatrixPanel_I2S_DMA config - %ux%u length: %u\n", mxconfig.mx_width, mxconfig.mx_height, mxconfig.chain_length);
DEBUG_PRINTF("R1_PIN=%u, G1_PIN=%u, B1_PIN=%u, R2_PIN=%u, G2_PIN=%u, B2_PIN=%u, A_PIN=%u, B_PIN=%u, C_PIN=%u, D_PIN=%u, E_PIN=%u, LAT_PIN=%u, OE_PIN=%u, CLK_PIN=%u\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be USER_PRINTF - the user might be interested to know this

@netmindz
Copy link
Collaborator Author

Thanks for the feedback, it's still a work in progress however

I still need to work out how much of the changes to the config can be brought over without also bringing in the bus-config PR and possibly other parts of the 0_15 changes to the led settings page

uint8_t BusHub75Matrix::getPins(uint8_t* pinArray) const {
pinArray[0] = mxconfig.mx_width;
pinArray[1] = mxconfig.mx_height;
pinArray[2] = mxconfig.chain_length;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MM expects chain_length in pinArray[0].

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I know. The code isn't ready for review

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to revert this bit in the short term if we are sticking with panel size as ledtype, but then how we build the fourpanel etc code is then much harder to keep consistent between AC and MM so would rather bring over that change

Copy link
Collaborator

@softhack007 softhack007 Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, makes sense.
For for the moment, we might even put chain_length into pins[2], while first two values are "dummies" for later.

@netmindz
Copy link
Collaborator Author

Known issue- Color order - displaying on screen, but not persisting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants