From f7673aa60cb59d8b7e77a91ff2c95970f0216fa5 Mon Sep 17 00:00:00 2001 From: arfrie22 <43021241+arfrie22@users.noreply.github.com> Date: Tue, 18 Jun 2024 12:10:42 -0400 Subject: [PATCH] Use new write body data --- opensprinkler_server.cpp | 4 ++-- platformio.ini | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/opensprinkler_server.cpp b/opensprinkler_server.cpp index 8d825373..8ca5c119 100644 --- a/opensprinkler_server.cpp +++ b/opensprinkler_server.cpp @@ -45,7 +45,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 @@ -217,7 +217,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 82ad5dd3..3755f933 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