Closed Nobbynews closed 3 years ago
I got the same error. Commenting these two lines (NeoPixelSendStatus(event->Source)) made build & upload possible and it works without problems. Statusrequest command or any other feedback are now missing as a result.
Found a cleaner solution: Just cut and paste the JsonResponse part from the end of the code to the top.
`// --------------------------------------------------------------------------------- // ------------------------------ JsonResponse ------------------------------------- // --------------------------------------------------------------------------------- void NeoPixelSendStatus(EventValueSource::Enum eventSource) { String log = String(F("NeoPixelBusFX: Set ")) + rgb.R
String(F("/")) + rgb.G + String(F("/")) + rgb.B; addLog(LOG_LEVEL_INFO, log);
String json; printToWebJSON = true; json += F("{\n"); json += F("\"plugin\": \"124"); json += F("\",\n\"mode\": \""); json += modeName[mode]; json += F("\",\n\"lastmode\": \""); json += modeName[savemode]; json += F("\",\n\"fadetime\": \""); json += fadetime; json += F("\",\n\"fadedelay\": \""); json += fadedelay; json += F("\",\n\"dim\": \""); json += Plugin_124_pixels->GetBrightness(); json += F("\",\n\"rgb\": \""); json += colorStr; json += F("\",\n\"hue\": \""); json += toString((HsbColor(RgbColor(rgb.R,rgb.G,rgb.B)).H 360),0); json += F("\",\n\"saturation\": \""); json += toString((HsbColor(RgbColor(rgb.R,rgb.G,rgb.B)).S 100),0); json += F("\",\n\"brightness\": \""); json += toString((HsbColor(RgbColor(rgb.R,rgb.G,rgb.B)).B * 100),0); json += F("\",\n\"bgcolor\": \""); json += backgroundcolorStr; json += F("\",\n\"count\": \""); json += count; json += F("\",\n\"speed\": \""); json += speed; json += F("\",\n\"pixelcount\": \""); json += pixelCount; json += F("\"\n}\n"); SendStatus(eventSource, json); // send http response to controller (JSON format) printToWeb=false; }`
compiled with no errors and works like a charm 👍
hope this helps
All fixed with the latest Version of NeoPixelBusFX and Espeasy. Thanks @clumsy-stefan !
n.p.... I'm using the plugin a lot so I'm happy to contribute...
That´s fine, thank you. I will try it soon.
Compiling ESPEasy version mega-20200829 with PlatfromIO i got this error: C:/Daten/ESPEasy/source/src/_P124_NeoPixelBusFX.ino: In function 'boolean Plugin_124(byte, EventStruct*, String&)': C:/Daten/ESPEasy/source/src/_P124_NeoPixelBusFX.ino:862:41: error: 'NeoPixelSendStatus' was not declared in this scope NeoPixelSendStatus(event->Source); ^ C:/Daten/ESPEasy/source/src/_P124_NeoPixelBusFX.ino:957:41: error: 'NeoPixelSendStatus' was not declared in this scope NeoPixelSendStatus(event->Source);
Any idea?