KNX: Automatic Multicast Library Selection

This commit is contained in:
Adrian Scillato 2018-08-27 02:26:21 -03:00 committed by GitHub
parent ea43540b43
commit 960c2e32fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 9 deletions

View File

@ -7,14 +7,6 @@
#ifndef ESP_KNX_IP_H
#define ESP_KNX_IP_H
//#define USE_ASYNC_UDP // UDP WIFI Library Selection for Multicast
// If commented out, the esp-knx-ip library will use WIFI_UDP Library that is compatible with ESP8266 Library Version 2.3.0 and up
// If not commented out, the esp-knx-ip library will use ESPAsyncUDP Library that is compatible with ESP8266 Library Version 2.4.0 and up
// The ESPAsyncUDP Library have a more reliable multicast communication
// Please Use it with Patch (https://github.com/me-no-dev/ESPAsyncUDP/pull/21) )
// check line 57 on esp-knx-ip.h file is uncommented: #include <ESPAsyncUDP.h>
// Comment out that line when using UDP WIFI to avoid compiling issues on PlatformIO with ESP8266 Library Version 2.3.0
/**
* CONFIG
* All MAX_ values must not exceed 255 (1 byte, except MAC_CONFIG_SPACE which can go up to 2 bytes, so 0xffff in theory) and must not be negative!
@ -54,8 +46,13 @@
#include <EEPROM.h>
#include <ESP8266WiFi.h>
#include <core_version.h> // Arduino_Esp8266 version information (ARDUINO_ESP8266_RELEASE and ARDUINO_ESP8266_RELEASE_2_3_0)
#ifndef ARDUINO_ESP8266_RELEASE_2_3_0
#define USE_ASYNC_UDP // UDP WIFI Library Selection for Multicast
#endif
#ifdef USE_ASYNC_UDP
//#include <ESPAsyncUDP.h>
#include <ESPAsyncUDP.h>
#else
#include <WiFiUdp.h>
#endif