diff --git a/lib/esp-knx-ip-0.5.1/DPT.h b/lib/esp-knx-ip-0.5.2/DPT.h similarity index 95% rename from lib/esp-knx-ip-0.5.1/DPT.h rename to lib/esp-knx-ip-0.5.2/DPT.h index 71045b103..3529d51af 100644 --- a/lib/esp-knx-ip-0.5.1/DPT.h +++ b/lib/esp-knx-ip-0.5.2/DPT.h @@ -40,13 +40,14 @@ typedef enum __dpt_3_007 typedef enum __weekday { + DPT_10_001_WEEKDAY_NODAY = 0, DPT_10_001_WEEKDAY_MONDAY = 1, DPT_10_001_WEEKDAY_TUESDAY = 2, DPT_10_001_WEEKDAY_WEDNESDAY = 3, DPT_10_001_WEEKDAY_THURSDAY = 4, DPT_10_001_WEEKDAY_FRIDAY = 5, DPT_10_001_WEEKDAY_SATURDAY = 6, - DPT_10_001_WEEKDAY_SUNDAY = 8, + DPT_10_001_WEEKDAY_SUNDAY = 7, } weekday_t; typedef struct __time_of_day diff --git a/lib/esp-knx-ip-0.5.1/LICENSE b/lib/esp-knx-ip-0.5.2/LICENSE similarity index 100% rename from lib/esp-knx-ip-0.5.1/LICENSE rename to lib/esp-knx-ip-0.5.2/LICENSE diff --git a/lib/esp-knx-ip-0.5.1/README.md b/lib/esp-knx-ip-0.5.2/README.md similarity index 100% rename from lib/esp-knx-ip-0.5.1/README.md rename to lib/esp-knx-ip-0.5.2/README.md diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-config.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-config.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-config.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-config.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-conversion.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-conversion.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-conversion.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-conversion.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp similarity index 96% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp index ae5e9fabc..787f045bf 100644 --- a/lib/esp-knx-ip-0.5.1/esp-knx-ip-send.cpp +++ b/lib/esp-knx-ip-0.5.2/esp-knx-ip-send.cpp @@ -185,3 +185,15 @@ void ESPKNXIP::send_4byte_float(address_t const &receiver, knx_command_type_t ct uint8_t buf[] = {0x00, ((uint8_t *)&val)[3], ((uint8_t *)&val)[2], ((uint8_t *)&val)[1], ((uint8_t *)&val)[0]}; send(receiver, ct, 5, buf); } + +void ESPKNXIP::send_14byte_string(address_t const &receiver, knx_command_type_t ct, const char *val) +{ + uint8_t buf[14]; + int len = strlen(val); + if (len > 14) + { + len = 14; + } + memcpy(buf, val, len); + send(receiver, ct, 14, buf); +} diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip-webserver.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip-webserver.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip-webserver.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip-webserver.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip.cpp b/lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp similarity index 100% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip.cpp rename to lib/esp-knx-ip-0.5.2/esp-knx-ip.cpp diff --git a/lib/esp-knx-ip-0.5.1/esp-knx-ip.h b/lib/esp-knx-ip-0.5.2/esp-knx-ip.h similarity index 98% rename from lib/esp-knx-ip-0.5.1/esp-knx-ip.h rename to lib/esp-knx-ip-0.5.2/esp-knx-ip.h index e2346c5a3..eb5ecf7b0 100644 --- a/lib/esp-knx-ip-0.5.1/esp-knx-ip.h +++ b/lib/esp-knx-ip-0.5.2/esp-knx-ip.h @@ -451,6 +451,7 @@ class ESPKNXIP { void send_4byte_int(address_t const &receiver, knx_command_type_t ct, int32_t val); void send_4byte_uint(address_t const &receiver, knx_command_type_t ct, uint32_t val); void send_4byte_float(address_t const &receiver, knx_command_type_t ct, float val); + void send_14byte_string(address_t const &receiver, knx_command_type_t ct, const char *val); void write_1bit(address_t const &receiver, uint8_t bit) { send_1bit(receiver, KNX_CT_WRITE, bit); } void write_2bit(address_t const &receiver, uint8_t twobit) { send_2bit(receiver, KNX_CT_WRITE, twobit); } @@ -469,6 +470,7 @@ class ESPKNXIP { void write_4byte_int(address_t const &receiver, int32_t val) { send_4byte_int(receiver, KNX_CT_WRITE, val); } void write_4byte_uint(address_t const &receiver, uint32_t val) { send_4byte_uint(receiver, KNX_CT_WRITE, val); } void write_4byte_float(address_t const &receiver, float val) { send_4byte_float(receiver, KNX_CT_WRITE, val);} + void write_14byte_string(address_t const &receiver, const char *val) { send_14byte_string(receiver, KNX_CT_WRITE, val); } void answer_1bit(address_t const &receiver, uint8_t bit) { send_1bit(receiver, KNX_CT_ANSWER, bit); } void answer_2bit(address_t const &receiver, uint8_t twobit) { send_2bit(receiver, KNX_CT_ANSWER, twobit); } @@ -487,6 +489,7 @@ class ESPKNXIP { void answer_4byte_int(address_t const &receiver, int32_t val) { send_4byte_int(receiver, KNX_CT_ANSWER, val); } void answer_4byte_uint(address_t const &receiver, uint32_t val) { send_4byte_uint(receiver, KNX_CT_ANSWER, val); } void answer_4byte_float(address_t const &receiver, float val) { send_4byte_float(receiver, KNX_CT_ANSWER, val);} + void answer_14byte_string(address_t const &receiver, const char *val) { send_14byte_string(receiver, KNX_CT_ANSWER, val); } bool data_to_bool(uint8_t *data); int8_t data_to_1byte_int(uint8_t *data); diff --git a/lib/esp-knx-ip-0.5.1/examples/environment-sensor/environment-sensor.ino b/lib/esp-knx-ip-0.5.2/examples/environment-sensor/environment-sensor.ino similarity index 100% rename from lib/esp-knx-ip-0.5.1/examples/environment-sensor/environment-sensor.ino rename to lib/esp-knx-ip-0.5.2/examples/environment-sensor/environment-sensor.ino diff --git a/lib/esp-knx-ip-0.5.1/examples/sonoff/sonoff.ino b/lib/esp-knx-ip-0.5.2/examples/sonoff/sonoff.ino similarity index 100% rename from lib/esp-knx-ip-0.5.1/examples/sonoff/sonoff.ino rename to lib/esp-knx-ip-0.5.2/examples/sonoff/sonoff.ino diff --git a/lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino b/lib/esp-knx-ip-0.5.2/examples/static-config/static-config.ino similarity index 87% rename from lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino rename to lib/esp-knx-ip-0.5.2/examples/static-config/static-config.ino index bea5093f3..54472dda3 100644 --- a/lib/esp-knx-ip-0.5.1/examples/static-config/static-config.ino +++ b/lib/esp-knx-ip-0.5.2/examples/static-config/static-config.ino @@ -31,14 +31,14 @@ void setup() { pinMode(LED_PIN, OUTPUT); Serial.begin(115200); - callback_id_t temp_cb = knx.callback_register("Read Temperature", temp_cb); - callback_id_t hum_cb =knx.callback_register("Read Humidity", hum_cb); - callback_id_t pres_cb =knx.callback_register("Read Pressure", pres_cb); + callback_id_t temp_cb_id = knx.callback_register("Read Temperature", temp_cb); + callback_id_t hum_cb_id =knx.callback_register("Read Humidity", hum_cb); + callback_id_t pres_cb_id =knx.callback_register("Read Pressure", pres_cb); // Assign callbacks to group addresses (2/1/1, 2/1/2, 2/1/3) - knx.callback_assign(temp_cb, knx.GA_to_address(2, 1, 1)); - knx.callback_assign(hum_cb, knx.GA_to_address(2, 1, 2)); - knx.callback_assign(pres_cb, knx.GA_to_address(2, 1, 3)); + knx.callback_assign(temp_cb_id, knx.GA_to_address(2, 1, 1)); + knx.callback_assign(hum_cb_id, knx.GA_to_address(2, 1, 2)); + knx.callback_assign(pres_cb_id, knx.GA_to_address(2, 1, 3)); // Set physical address (1.1.1) knx.physical_address_set(knx.PA_to_address(1, 1, 1)); diff --git a/lib/esp-knx-ip-0.5.1/keywords.txt b/lib/esp-knx-ip-0.5.2/keywords.txt similarity index 100% rename from lib/esp-knx-ip-0.5.1/keywords.txt rename to lib/esp-knx-ip-0.5.2/keywords.txt diff --git a/lib/esp-knx-ip-0.5.1/library.properties b/lib/esp-knx-ip-0.5.2/library.properties similarity index 95% rename from lib/esp-knx-ip-0.5.1/library.properties rename to lib/esp-knx-ip-0.5.2/library.properties index 1adbc402a..f3b86de9c 100644 --- a/lib/esp-knx-ip-0.5.1/library.properties +++ b/lib/esp-knx-ip-0.5.2/library.properties @@ -1,5 +1,5 @@ name=ESP KNX IP Library -version=0.5.1 +version=0.5.2 author=Nico Weichbrodt maintainer=Nico Weichbrodt sentence=ESP8266 library for KNX/IP communication.