Skip to content

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 ?


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

@yeawellwhatever
Copy link

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 ?

The 2.5mm pitch panels that I got has the G and B swapped. Fixed it by swapping the pinout in bus_manager.cpp.
Also mentioned at https://www.adafruit.com/product/5036

@netmindz netmindz self-assigned this Oct 5, 2025
Copy link

coderabbitai bot commented Oct 5, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

3 participants