Fix bad define ESP82666

This commit is contained in:
Theo Arends 2024-09-19 11:07:16 +02:00
parent 0dfab3684c
commit a30f47a901
3 changed files with 4 additions and 4 deletions

View File

@ -9906,7 +9906,7 @@ void Script_Handle_Hue(String path) {
uint16_t args = Webserver->args(); uint16_t args = Webserver->args();
#ifdef ESP82666 #ifdef ESP8266
char *json = (char*)Webserver->arg(args - 1).c_str(); char *json = (char*)Webserver->arg(args - 1).c_str();
#else #else
String request_arg = Webserver->arg(args - 1); String request_arg = Webserver->arg(args - 1);

View File

@ -763,7 +763,7 @@ void HueLightsCommand(uint8_t device, uint32_t device_id, String &response) {
if (Webserver->args()) { if (Webserver->args()) {
response = "["; response = "[";
#ifdef ESP82666 // ESP8266 memory is limited, avoid copying and modify in place #ifdef ESP8266 // ESP8266 memory is limited, avoid copying and modify in place
JsonParser parser((char*) Webserver->arg((Webserver->args())-1).c_str()); JsonParser parser((char*) Webserver->arg((Webserver->args())-1).c_str());
#else // does not work on ESP32, we need to get a fresh copy of the string #else // does not work on ESP32, we need to get a fresh copy of the string
String request_arg = Webserver->arg((Webserver->args())-1); String request_arg = Webserver->arg((Webserver->args())-1);

View File

@ -270,9 +270,9 @@ int32_t ZigbeeHandleHue(uint16_t shortaddr, uint8_t ep, uint32_t device_id, uint
if (Webserver->args()) { if (Webserver->args()) {
response = "["; response = "[";
#ifdef ESP82666 // ESP8266 memory is limited, avoid copying and modify in place #ifdef ESP8266 // ESP8266 memory is limited, avoid copying and modify in place
JsonParser parser((char*) Webserver->arg((Webserver->args())-1).c_str()); JsonParser parser((char*) Webserver->arg((Webserver->args())-1).c_str());
#else // does not work on ESP32, we need to get a fresh copy of the string #else // does not work on ESP32, we need to get a fresh copy of the string
String request_arg = Webserver->arg((Webserver->args())-1); String request_arg = Webserver->arg((Webserver->args())-1);
JsonParser parser((char*) request_arg.c_str()); JsonParser parser((char*) request_arg.c_str());
#endif #endif