From a3bda0ec082f8b6de72721bd68655e65275034e3 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Tue, 3 Nov 2020 23:00:11 +0100 Subject: [PATCH] Add HASP_OTA_PORT --- include/hasp_conf.h | 7 +++++++ src/hasp_ota.cpp | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/hasp_conf.h b/include/hasp_conf.h index 134dd1ca..7327b4a8 100644 --- a/include/hasp_conf.h +++ b/include/hasp_conf.h @@ -144,6 +144,13 @@ #if HASP_USE_OTA > 0 #include "hasp_ota.h" + +#ifndef HASP_OTA_PORT +#if defined(ARDUINO_ARCH_ESP32) +#define HASP_OTA_PORT 3232 +#elif defined(ARDUINO_ARCH_ESP8266) +#define HASP_OTA_PORT 8266 +#endif #endif #if HASP_USE_TASMOTA_SLAVE > 0 diff --git a/src/hasp_ota.cpp b/src/hasp_ota.cpp index cc7a3fca..64acf333 100644 --- a/src/hasp_ota.cpp +++ b/src/hasp_ota.cpp @@ -34,7 +34,8 @@ static WiFiClient otaClient; std::string otaUrl = "http://10.1.0.3"; int8_t otaPrecentageComplete = -1; -int16_t otaPort = 3232; + +int16_t otaPort = HASP_OTA_PORT; void otaProgress() {