From 83d6049fe54dbe6603a150b17edae69fa2cd0e6b Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Mon, 9 Apr 2018 22:42:51 -0300 Subject: [PATCH] Update to new API version of ESP-KNX-IP --- .../esp-knx-ip-webserver.cpp | 22 +- lib/esp-knx-ip-async-udp/esp-knx-ip.cpp | 413 +++++++++++------- lib/esp-knx-ip-async-udp/esp-knx-ip.h | 90 ++-- lib/esp-knx-ip-async-udp/keywords.txt | 16 +- 4 files changed, 356 insertions(+), 185 deletions(-) diff --git a/lib/esp-knx-ip-async-udp/esp-knx-ip-webserver.cpp b/lib/esp-knx-ip-async-udp/esp-knx-ip-webserver.cpp index af981b78d..bdbc013fd 100644 --- a/lib/esp-knx-ip-async-udp/esp-knx-ip-webserver.cpp +++ b/lib/esp-knx-ip-async-udp/esp-knx-ip-webserver.cpp @@ -41,7 +41,9 @@ void ESPKNXIP::__handle_root() break; case FEEDBACK_TYPE_FLOAT: m += F(""); + m += feedbacks[i].options.float_options.prefix; m += String(*(float *)feedbacks[i].data, feedbacks[i].options.float_options.precision); + m += feedbacks[i].options.float_options.suffix; m += F(""); break; case FEEDBACK_TYPE_BOOL: @@ -52,7 +54,9 @@ void ESPKNXIP::__handle_root() case FEEDBACK_TYPE_ACTION: m += F("
"); + m += F("' />
"); break; } m += F(""); @@ -67,6 +71,12 @@ void ESPKNXIP::__handle_root() { for (uint8_t i = 0; i < registered_callback_assignments; ++i) { + // Skip empty slots + if ((callback_assignments[i].slot_flags & SLOT_FLAGS_USED) == 0) + { + continue; + } + // Skip disabled callbacks if (callbacks[callback_assignments[i].callback_id].cond && !callbacks[callback_assignments[i].callback_id].cond()) { continue; @@ -105,6 +115,12 @@ void ESPKNXIP::__handle_root() m += F("