diff --git a/opensprinkler_server.cpp b/opensprinkler_server.cpp index 02075557..5ee33472 100644 --- a/opensprinkler_server.cpp +++ b/opensprinkler_server.cpp @@ -46,7 +46,7 @@ #define OTF_PARAMS_DEF const OTF::Request &req,OTF::Response &res #define OTF_PARAMS req,res #define FKV_SOURCE req - #define handle_return(x) {if(x==HTML_OK) res.writeBodyChunk((char *)"%s",ether_buffer); else otf_send_result(req,res,x); return;} + #define handle_return(x) {if(x==HTML_OK) res.writeBodyData(ether_buffer, strlen(ether_buffer)); else otf_send_result(req,res,x); return;} #else @@ -218,7 +218,7 @@ void rewind_ether_buffer() { void send_packet(OTF_PARAMS_DEF) { #if defined(ESP8266) - res.writeBodyChunk((char *)"%s",ether_buffer); + res.writeBodyData(ether_buffer, strlen(ether_buffer)); #else m_client->write((const uint8_t *)ether_buffer, strlen(ether_buffer)); #endif diff --git a/platformio.ini b/platformio.ini index 8ca2903f..681d87a4 100644 --- a/platformio.ini +++ b/platformio.ini @@ -24,8 +24,7 @@ lib_deps = sui77/rc-switch @ ^2.6.3 https://github.com/ThingPulse/esp8266-oled-ssd1306/archive/4.2.0.zip knolleary/PubSubClient @ ^2.8 - https://github.com/OpenThingsIO/OpenThings-Framework-Firmware-Library/archive/refs/heads/master.zip - https://github.com/Links2004/arduinoWebSockets/archive/refs/tags/2.3.5.zip + https://github.com/OpenThingsIO/OpenThings-Framework-Firmware-Library @ ^0.1.0 ; ignore html2raw.cpp source file for firmware compilation (external helper program) build_src_filter = +<*> - upload_speed = 460800