ESP8266 Gateway logic conflict MY_GATEWAY_CLIENT_MODE & MY_USE_UDP
-
Scenario: GatewayESP8266 with UDP
If you clone the development version from github and try to compile the GatewayESP8266 with MY_USE_UDP it will fall over a bunch of compilation errors.
The reason is found in the MySensors.h around line 153, GATEWAY - TRANSPORT#if (defined(MY_CONTROLLER_IP_ADDRESS) || defined(MY_CONTROLLER_URL_ADDRESS)) #define MY_GATEWAY_CLIENT_MODE #endif #if defined(MY_USE_UDP) && !defined(MY_GATEWAY_CLIENT_MODE) #error You must specify MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS for UDP #endifOnce you define MY_USE_UDP you will also want to define MY_CONTROLLER_IP_ADDRESS to send the packages to your controller,
However as you see in the first line if MY_CONTROLLER_IP_ADDRESS is defined then MY_GATEWAY_CLIENT_MODE will be auto defined and this
will conflict with UDP use.I've fixed it changing to:
#if (defined(MY_CONTROLLER_IP_ADDRESS) || defined(MY_CONTROLLER_URL_ADDRESS)) && !defined(MY_USE_UDP) #define MY_GATEWAY_CLIENT_MODE #endif #if defined(MY_USE_UDP) && (!defined(MY_CONTROLLER_IP_ADDRESS) && !defined(MY_CONTROLLER_URL_ADDRESS)) #error You must specify MY_CONTROLLER_IP_ADDRESS or MY_CONTROLLER_URL_ADDRESS for UDP #endif
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login