You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uint8_t ddpChannelsPerLed = (p->dataType & 0b00111000 == 0b011) ? 4 : 3; // data type 0x1B (formerly 0x1A) is RGBW (type 3, 8 bit/channel)
Compiler warning:
wled00/e131.cpp:29:57: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
uint8_t ddpChannelsPerLed = (p->dataType & 0b00111000 == 0b011) ? 4 : 3; // data type 0x1B (formerly 0x1A) is RGBW (type 3, 8 bit/channel)
~~~~~~~~~~~^~~~~~~~
If it is intended as ((p->dataType & 0b00111000) == 0b011), then the decision cannot become true. Any value & 0b00111000 will not have the lowest 3 bits sets, as they are masked out by "&".
Actually I'm not sure how it was indented to work, maybe the original author could take a look?
The text was updated successfully, but these errors were encountered:
This line is a bit suspicious, and I doubt it will work as intended (from #3193)
WLED/wled00/e131.cpp
Line 28 in 999bec1
Compiler warning:
If it is intended as
((p->dataType & 0b00111000) == 0b011)
, then the decision cannot become true. Any value & 0b00111000 will not have the lowest 3 bits sets, as they are masked out by "&".Actually I'm not sure how it was indented to work, maybe the original author could take a look?
The text was updated successfully, but these errors were encountered: