From 16463ef2d7c8f244e8dd983b28bac5b0e89d828d Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Thu, 11 Jul 2019 15:29:39 -0300 Subject: [PATCH] Update esp-knx-ip library to latest --- lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp index 787f045bf..e71e5954c 100644 --- a/lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp +++ b/lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp @@ -188,12 +188,14 @@ void ESPKNXIP::send_4byte_float(address_t const &receiver, knx_command_type_t ct void ESPKNXIP::send_14byte_string(address_t const &receiver, knx_command_type_t ct, const char *val) { - uint8_t buf[14]; + // DPT16 strings are always 14 bytes long, however the data array is one larger due to the telegram structure. + // The first byte needs to be zero, string start after that. + uint8_t buf[15] = {0x00}; int len = strlen(val); if (len > 14) { len = 14; } - memcpy(buf, val, len); - send(receiver, ct, 14, buf); + memcpy(buf+1, val, len); + send(receiver, ct, 15, buf); }