mirror of
https://github.com/thelsing/knx.git
synced 2025-08-17 13:47:28 +02:00
save work
This commit is contained in:
parent
68b38feaea
commit
79354f2394
@ -41,15 +41,17 @@ void RouterObject::initialize(uint8_t objIndex, DptMedium mediumType, bool useHo
|
||||
new DataProperty( PID_MEDIUM, false, PDT_ENUM8, 1, ReadLv3 | WriteLv0, (uint8_t) mediumType ),
|
||||
|
||||
};
|
||||
uint8_t fixesPropertiesCount = sizeof(fixedProperties) / sizeof(Property*);
|
||||
|
||||
size_t allPropertiesCount = sizeof(fixedProperties) / sizeof(Property*);
|
||||
size_t allPropertiesCount = fixesPropertiesCount;
|
||||
allPropertiesCount += useHopCount ? 1 : 0;
|
||||
allPropertiesCount += useTable ? 1 : 0;
|
||||
allPropertiesCount += (mediumType == DptMedium::KNX_RF) ? 1 : 0;
|
||||
|
||||
Property* allProperties[allPropertiesCount];
|
||||
memcpy(&allProperties[0], &fixedProperties[0], sizeof(fixedProperties));
|
||||
|
||||
uint8_t i = 0;
|
||||
uint8_t i = fixesPropertiesCount;
|
||||
|
||||
if (useHopCount)
|
||||
{
|
||||
|
@ -280,8 +280,8 @@ void TableObject::initializeProperties(size_t propertiesSize, Property** propert
|
||||
uint8_t allPropertiesCount = propertyCount + ownPropertiesCount;
|
||||
|
||||
Property* allProperties[allPropertiesCount];
|
||||
memcpy(allProperties, properties, propertiesSize);
|
||||
memcpy(allProperties + propertiesSize, ownProperties, sizeof(ownProperties));
|
||||
memcpy(&allProperties[0], properties, propertiesSize);
|
||||
memcpy(&allProperties[propertyCount], ownProperties, sizeof(ownProperties));
|
||||
|
||||
InterfaceObject::initializeProperties(sizeof(allProperties), allProperties);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user