-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
base: mdev
Are you sure you want to change the base?
Conversation
Looks good 👍 I'll test it over the weekend, and then merge into mdev. Two questions:
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}; |
There was a problem hiding this comment.
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};
wled00/bus_manager.cpp
Outdated
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate (see line 745)
wled00/bus_manager.cpp
Outdated
} | ||
|
||
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", |
There was a problem hiding this comment.
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
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 |
wled00/bus_manager.cpp
Outdated
uint8_t BusHub75Matrix::getPins(uint8_t* pinArray) const { | ||
pinArray[0] = mxconfig.mx_width; | ||
pinArray[1] = mxconfig.mx_height; | ||
pinArray[2] = mxconfig.chain_length; |
There was a problem hiding this comment.
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].
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Known issue- Color order - displaying on screen, but not persisting |
Bring the changes done for the cleanup as part of 0_15 and AC back into MM