From 7cb0492a302c982c906e43944b3abe097ebd844a Mon Sep 17 00:00:00 2001 From: Andrey Klimov Date: Tue, 30 Apr 2019 12:51:57 +0300 Subject: [PATCH] Now MQTT compatible with test.mosquitto.org free broker (empty User vs NULL user) Few analog-in fixes. ESP32 compilation broken due doard definition changed. Trying to workaround it --- lighthub/inputs.cpp | 2 +- lighthub/main.cpp | 18 ++++++++++++------ lighthub/main.h | 8 ++++++-- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/lighthub/inputs.cpp b/lighthub/inputs.cpp index cb316d6..13abc70 100644 --- a/lighthub/inputs.cpp +++ b/lighthub/inputs.cpp @@ -470,7 +470,7 @@ void Input::analogPoll() { // Mapping if (inputMap && inputMap->type == aJson_Array) { - int max; + int max=1024; if (aJson.getArraySize(inputMap)>=4) mappedInputVal = map (mappedInputVal, aJson.getArrayItem(inputMap, 0)->valueint, diff --git a/lighthub/main.cpp b/lighthub/main.cpp index 158c5b7..e0588f3 100644 --- a/lighthub/main.cpp +++ b/lighthub/main.cpp @@ -566,6 +566,11 @@ void ip_ready_config_loaded_connecting_to_broker() { debugSerial< //this needs to be first, or it all crashes and burns... #include #include +//#include +//#include "HttpClient.h" #include #include #include @@ -27,10 +29,12 @@ #endif #if defined ARDUINO_ARCH_ESP32 -//#include //this needs to be first, or it all crashes and burns... +#include //this needs to be first, or it all crashes and burns... //#include #include -#include +//#include "HttpClient.h" +//#include +#include #include #include #include