removed MDNS, now OTA works for both esp8266 and esp32

This commit is contained in:
proddy
2019-02-23 16:27:42 +01:00
parent 23d3517f27
commit 3fab61513d
4 changed files with 18 additions and 46 deletions

View File

@@ -18,12 +18,14 @@
#include <TelnetSpy.h> // modified from https://github.com/yasheena/telnetspy
#if defined(ARDUINO_ARCH_ESP32)
#include <ESPmDNS.h>
//#include <ESPmDNS.h>
#include <SPIFFS.h> // added for ESP32
#define ets_vsnprintf vsnprintf // added for ESP32
#define OTA_PORT 8266
#else
#include <ESP8266mDNS.h>
//#include <ESP8266mDNS.h>
#include <ESPAsyncTCP.h>
#define OTA_PORT 3232
#endif
#define MYEMS_CONFIG_FILE "/config.json"
@@ -34,9 +36,6 @@
#define WIFI_CONNECT_TIMEOUT 10000 // Connecting timeout for WIFI in ms
#define WIFI_RECONNECT_INTERVAL 60000 // If could not connect to WIFI, retry after this time in ms
// OTA
#define OTA_PORT 3232 // OTA port. Was 8266
// MQTT
#define MQTT_PORT 1883 // MQTT port
#define MQTT_RECONNECT_DELAY_MIN 5000 // Try to reconnect in 5 seconds upon disconnection
@@ -170,9 +169,6 @@ class MyESP {
char * _wifi_password;
bool _wifi_connected;
// mdns
void _mdns_setup();
// ota
void _ota_setup();