Improve liveview2D: add width and height > 256 leds

This commit is contained in:
ewowi
2022-07-28 16:13:31 +02:00
parent 863212915c
commit affcca8034
7 changed files with 1916 additions and 1917 deletions

View File

@@ -138,7 +138,7 @@ void sendDataWs(AsyncWebSocketClient * client)
releaseJSONBufferLock();
}
#define MAX_LIVE_LEDS_WS 256
#define MAX_LIVE_LEDS_WS 1024
bool sendLiveLedsWs(uint32_t wsClient)
{
@@ -153,8 +153,10 @@ bool sendLiveLedsWs(uint32_t wsClient)
uint8_t* buffer = wsBuf->get();
buffer[0] = 'L';
buffer[1] = 1; //version
buffer[2] = strip.matrixWidth;
buffer[3] = strip.matrixHeight;
uint16_t pos = 2;
uint16_t pos = 4;
for (uint16_t i= 0; pos < bufSize -2; i += n)
{
uint32_t c = strip.getPixelColor(i);