mirror of
https://github.com/thelsing/knx.git
synced 2025-10-17 11:14:33 +02:00
Fix comment and add missing size adjustment in other method
This commit is contained in:
parent
cac333fbd2
commit
46fa13df04
@ -230,7 +230,7 @@ void BauSystemB::propertyValueReadIndication(Priority priority, HopCountType hop
|
|||||||
if (startIndex > 0)
|
if (startIndex > 0)
|
||||||
size = elementSize * numberOfElements;
|
size = elementSize * numberOfElements;
|
||||||
else
|
else
|
||||||
size = sizeof(uint16_t); // size of propert array entry 0 which is the size
|
size = sizeof(uint16_t); // size of property array entry 0 which contains the current number of elements
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
elementCount = 0;
|
elementCount = 0;
|
||||||
@ -442,7 +442,10 @@ void BauSystemB::propertyValueRead(ObjectType objectType, uint8_t objectInstance
|
|||||||
if (obj)
|
if (obj)
|
||||||
{
|
{
|
||||||
uint8_t elementSize = obj->propertySize((PropertyID)propertyId);
|
uint8_t elementSize = obj->propertySize((PropertyID)propertyId);
|
||||||
size = elementSize * numberOfElements;
|
if (startIndex > 0)
|
||||||
|
size = elementSize * numberOfElements;
|
||||||
|
else
|
||||||
|
size = sizeof(uint16_t); // size of property array entry 0 which contains the current number of elements
|
||||||
*data = new uint8_t [size];
|
*data = new uint8_t [size];
|
||||||
obj->readProperty((PropertyID)propertyId, startIndex, elementCount, *data);
|
obj->readProperty((PropertyID)propertyId, startIndex, elementCount, *data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user