Fixed live preview not displaying whole light if over 255 LEDs

This commit is contained in:
cschwinne 2020-03-26 01:44:38 +01:00
parent 07d6bfa989
commit c4512b75d9
3 changed files with 20 additions and 16 deletions

View File

@ -2,6 +2,10 @@
### Development versions after 0.9.1 release
#### Build 2003261
- Fixed live preview not displaying whole light if over 255 LEDs
#### Build 2003251
- Added Pacifica effect (tentative, doesn't yet support other colors)

View File

@ -118,7 +118,7 @@
#endif
//version code in format yymmddb (b = daily build)
#define VERSION 2003251
#define VERSION 2003261
char versionString[] = "0.9.1";

View File

@ -387,8 +387,8 @@ void serveJson(AsyncWebServerRequest* request)
void serveLiveLeds(AsyncWebServerRequest* request)
{
byte used = ledCount;
byte n = (used -1) /MAX_LIVE_LEDS +1; //only serve every n'th LED if count over MAX_LIVE_LEDS
uint16_t used = ledCount;
uint16_t n = (used -1) /MAX_LIVE_LEDS +1; //only serve every n'th LED if count over MAX_LIVE_LEDS
char buffer[2000] = "{\"leds\":[";
olen = 9;
obuf = buffer;