diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-10-26 13:56:17 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-10-26 13:56:17 +0300 |
commit | 54fb8c8c6142d55122b76c82837aa0715fbb7d6a (patch) | |
tree | c6e262497d41066d6d5c00ffc98d07211c66a3a0 /src | |
parent | dd9a2a1f57f9c563d7307ed2249887786a2ed516 (diff) |
Fix MB6HC DotStar bug
Diffstat (limited to 'src')
-rw-r--r-- | src/Fans/LedStripDriver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fans/LedStripDriver.cpp b/src/Fans/LedStripDriver.cpp index 4ebc7306..f098e6eb 100644 --- a/src/Fans/LedStripDriver.cpp +++ b/src/Fans/LedStripDriver.cpp @@ -641,9 +641,9 @@ GCodeResult LedStripDriver::SetColours(GCodeBuffer& gb, const StringRef& reply) # if USE_16BIT_SPI // Swap bytes for 16-bit SPI - const uint32_t data = ((brightness << 5) | (0xE0 << 8)) | ((blue & 255)) | ((green & 255) << 24) | ((red & 255) << 16); + const uint32_t data = ((brightness & 0xF8) << 5) | (0xE0 << 8) | ((blue & 255)) | ((green & 255) << 24) | ((red & 255) << 16); # else - const uint32_t data = ((brightness >> 3) | 0xE0) | ((blue & 255) << 8) | ((green & 255) << 16) | ((red & 255) << 24); + const uint32_t data = (brightness >> 3) | 0xE0 | ((blue & 255) << 8) | ((green & 255) << 16) | ((red & 255) << 24); # endif return SendDotStarData(data, numLeds, following); } |