fix length of PDT_VERSION

This commit is contained in:
Thomas Kunze 2019-12-22 17:45:24 +01:00
parent d3d95f1185
commit 8f61ef8608
2 changed files with 2 additions and 3 deletions

View File

@ -12,7 +12,6 @@ DeviceObject::DeviceObject()
//Default to KNXA (0xFA) //Default to KNXA (0xFA)
uint8_t serialNumber[] = {0x00, 0xFA, 0x00, 0x00, 0x00, 0x00}; uint8_t serialNumber[] = {0x00, 0xFA, 0x00, 0x00, 0x00, 0x00};
uint8_t hardwareType[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; uint8_t hardwareType[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
uint8_t version[] = {0x00, 0x00, 0x03};
Property* properties[] = 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_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_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 DataProperty(PID_ROUTING_COUNT, true, PDT_UNSIGNED_CHAR, 1, ReadLv3 | WriteLv3, (uint8_t)0),
new CallbackProperty<DeviceObject>(this, PID_PROG_MODE, true, PDT_BITSET8, 1, ReadLv3 | WriteLv3, new CallbackProperty<DeviceObject>(this, PID_PROG_MODE, true, PDT_BITSET8, 1, ReadLv3 | WriteLv3,
[](DeviceObject* io, uint16_t start, uint8_t count, uint8_t* data) -> uint8_t [](DeviceObject* io, uint16_t start, uint8_t count, uint8_t* data) -> uint8_t

View File

@ -41,6 +41,7 @@ uint8_t Property::ElementSize() const
case PDT_INT: case PDT_INT:
case PDT_KNX_FLOAT: case PDT_KNX_FLOAT:
case PDT_UNSIGNED_INT: case PDT_UNSIGNED_INT:
case PDT_VERSION:
return 2; return 2;
case PDT_ALARM_INFO: case PDT_ALARM_INFO:
case PDT_BINARY_INFORMATION: case PDT_BINARY_INFORMATION:
@ -57,7 +58,6 @@ uint8_t Property::ElementSize() const
case PDT_SCALING: case PDT_SCALING:
case PDT_TIME: case PDT_TIME:
case PDT_UTF8: case PDT_UTF8:
case PDT_VERSION:
return 3; return 3;
case PDT_FLOAT: case PDT_FLOAT:
case PDT_GENERIC_04: case PDT_GENERIC_04: