From 8f61ef8608eccfb9f26c18e270f6616b54a195e9 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Sun, 22 Dec 2019 17:45:24 +0100 Subject: [PATCH] fix length of PDT_VERSION --- src/knx/device_object.cpp | 3 +-- src/knx/property.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/knx/device_object.cpp b/src/knx/device_object.cpp index 3d8e6c4..b24636e 100644 --- a/src/knx/device_object.cpp +++ b/src/knx/device_object.cpp @@ -12,7 +12,6 @@ DeviceObject::DeviceObject() //Default to KNXA (0xFA) uint8_t serialNumber[] = {0x00, 0xFA, 0x00, 0x00, 0x00, 0x00}; uint8_t hardwareType[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - uint8_t version[] = {0x00, 0x00, 0x03}; Property* properties[] = { @@ -29,7 +28,7 @@ DeviceObject::DeviceObject() }), new DataProperty(PID_DEVICE_CONTROL, true, PDT_BITSET8, 1, ReadLv3 | WriteLv3, (uint8_t)0), new DataProperty(PID_ORDER_INFO, false, PDT_GENERIC_10, 1, ReadLv3 | WriteLv0), - new DataProperty(PID_VERSION, false, PDT_VERSION, 1, ReadLv3 | WriteLv0, version), + new DataProperty(PID_VERSION, false, PDT_VERSION, 1, ReadLv3 | WriteLv0, (uint16_t)3), new DataProperty(PID_ROUTING_COUNT, true, PDT_UNSIGNED_CHAR, 1, ReadLv3 | WriteLv3, (uint8_t)0), new CallbackProperty(this, PID_PROG_MODE, true, PDT_BITSET8, 1, ReadLv3 | WriteLv3, [](DeviceObject* io, uint16_t start, uint8_t count, uint8_t* data) -> uint8_t diff --git a/src/knx/property.cpp b/src/knx/property.cpp index 7f5c1b9..aa0fad2 100644 --- a/src/knx/property.cpp +++ b/src/knx/property.cpp @@ -41,6 +41,7 @@ uint8_t Property::ElementSize() const case PDT_INT: case PDT_KNX_FLOAT: case PDT_UNSIGNED_INT: + case PDT_VERSION: return 2; case PDT_ALARM_INFO: case PDT_BINARY_INFORMATION: @@ -57,7 +58,6 @@ uint8_t Property::ElementSize() const case PDT_SCALING: case PDT_TIME: case PDT_UTF8: - case PDT_VERSION: return 3; case PDT_FLOAT: case PDT_GENERIC_04: