Add support for default ledmap.json + peek with ledmap if default panel

Thx to @Troy#2642
This commit is contained in:
Ewoud
2023-02-13 19:09:02 +01:00
parent 0d0f6b5e30
commit 9ba9a61af5
5 changed files with 767 additions and 760 deletions

View File

@@ -170,7 +170,12 @@ bool sendLiveLedsWs(uint32_t wsClient)
for (uint16_t i = 0; pos < bufSize -2; i += n)
{
uint32_t c = strip.getPixelColor(i);
//WLEDMM: include ledmap in peek if default panel
uint32_t c;
if (strip.panel.size()==1 && !strip.panel[0].vertical && !strip.panel[0].bottomStart && !strip.panel[0].rightStart) // one default panel
c = busses.getPixelColor(i);
else
c = strip.getPixelColor(i);
buffer[pos++] = qadd8(W(c), R(c)); //R, add white channel to RGB channels as a simple RGBW -> RGB map
buffer[pos++] = qadd8(W(c), G(c)); //G
buffer[pos++] = qadd8(W(c), B(c)); //B