From cccaf445598e489673849a9388ad619eabfcc3ab Mon Sep 17 00:00:00 2001 From: Andre Thomas Date: Sat, 15 Dec 2018 10:45:05 +0200 Subject: [PATCH] New 2.5.0-2 toolchain does not like uncast bitwise The new toolchain (2.5.0-2) used from core 2.5.0 does not want bitwise operations to be performed on non-integer variables so we cast the double used in send_2byte_float() to a (long) as it should be. --- lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp b/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp index 23ee319e6..ae5e9fabc 100644 --- a/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp +++ b/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp @@ -133,7 +133,7 @@ void ESPKNXIP::send_2byte_float(address_t const &receiver, knx_command_type_t ct ++e; for (; v > 2047.0f; v /= 2) ++e; - long m = round(v) & 0x7FF; + long m = (long)round(v) & 0x7FF; short msb = (short) (e << 3 | m >> 8); if (val < 0.0f) msb |= 0x80;