diff --git a/src/knx/dptconvert.cpp b/src/knx/dptconvert.cpp index e316873..e8b48b7 100644 --- a/src/knx/dptconvert.cpp +++ b/src/knx/dptconvert.cpp @@ -1008,7 +1008,7 @@ int valueToBusValueSigned16(const KNXValue& value, uint8_t* payload, size_t payl { if ((double)value < -327.68 || (double)value > 327.67) return false; - signed16ToPayload(payload, payload_length, 0, (double)value * 100.0, 0xFF); + signed16ToPayload(payload, payload_length, 0, (int16_t)((double)value * 100.0), 0xFFFF); } else signed16ToPayload(payload, payload_length, 0, (uint64_t)value, 0xffff);