envy / esp-knx-ip

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

ESP32 Quickfix #85

Open c-o-m-m-a-n-d-e-r opened 3 years ago

c-o-m-m-a-n-d-e-r commented 3 years ago

quick try to implement ESP32

wladwnt commented 2 years ago

Good Fox for ESP32, but this part change not needed (is wrong):

#ifdef ESP32
    long m = pow(round(v), 0x7FF);
#else
    long m = round(v) & 0x7FF;
#endif
c-o-m-m-a-n-d-e-r commented 2 years ago

Why? :-)

wladwnt commented 2 years ago

Because round(v) & 0x7f gives correct result on ESP32, checked via ETS5. Why the calculation on ESP32 should be different to ESP8266?

c-o-m-m-a-n-d-e-r commented 2 years ago

haha oh man ... you are right, sorry was writing from the autobahn ... ignore that please 🤣