envy / esp-knx-ip

A KNX/IP library for the ESP8266 with Arduino
MIT License
136 stars 49 forks source link

Update esp-knx-ip.h #26

Closed ascillato closed 6 years ago

ascillato commented 6 years ago

Added #ifndef ROOT_PREFIX to have the option to set the Root Prefix before calling the #include <esp-knx-ip.h>, so as to eliminate the need of modifying the library.

Changing the name of ntohs to __ntohs to eliminate conflict when using ESP8266 LWIP library.

envy commented 6 years ago

Have you tested the ROOT_PREFIX change? I did and it does not work on my end. When defining ROOT_PREFIX in the .ino, then this define is only valid there. The library source files don't know about it and won't see the change. Defines are not global, only local to the files.

Also, for further pull requests, please only change one thing. I would like to merge to ntohs change but not the ROOT_PREFIX one.

ascillato commented 6 years ago

Hi,

Also, for further pull requests, please only change one thing.

Ah, Ok, sorry. For the next one :+1: