mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
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.
This commit is contained in:
parent
6d5650958d
commit
cccaf44559
@ -133,7 +133,7 @@ void ESPKNXIP::send_2byte_float(address_t const &receiver, knx_command_type_t ct
|
|||||||
++e;
|
++e;
|
||||||
for (; v > 2047.0f; v /= 2)
|
for (; v > 2047.0f; v /= 2)
|
||||||
++e;
|
++e;
|
||||||
long m = round(v) & 0x7FF;
|
long m = (long)round(v) & 0x7FF;
|
||||||
short msb = (short) (e << 3 | m >> 8);
|
short msb = (short) (e << 3 | m >> 8);
|
||||||
if (val < 0.0f)
|
if (val < 0.0f)
|
||||||
msb |= 0x80;
|
msb |= 0x80;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user