From b5b228c417b89e5689498aa7637f13a7dda809c1 Mon Sep 17 00:00:00 2001 From: SirSydom Date: Mon, 14 Feb 2022 18:31:02 +0100 Subject: [PATCH] clean up debug stuff, comments ... --- src/knx/bau_systemB.cpp | 12 ------------ src/knx/group_object_table_object.cpp | 4 ++-- src/knx/memory.cpp | 1 - src/knx/network_layer_device.cpp | 1 - src/knx/platform.cpp | 3 --- src/knx/table_object.cpp | 10 ++-------- 6 files changed, 4 insertions(+), 27 deletions(-) diff --git a/src/knx/bau_systemB.cpp b/src/knx/bau_systemB.cpp index 3d1bfa7..ea39670 100644 --- a/src/knx/bau_systemB.cpp +++ b/src/knx/bau_systemB.cpp @@ -112,7 +112,6 @@ void BauSystemB::memoryWriteIndication(Priority priority, HopCountType hopType, uint16_t memoryAddress, uint8_t * data) { _memory.writeMemory(memoryAddress, number, data); - Serial.println("memoryWriteIndication"); if (_deviceObj.verifyMode()) memoryReadIndicationP(priority, hopType, asap, secCtrl, number, memoryAddress, data); } @@ -212,12 +211,6 @@ void BauSystemB::propertyDescriptionReadIndication(Priority priority, HopCountTy void BauSystemB::propertyValueWriteIndication(Priority priority, HopCountType hopType, uint16_t asap, const SecurityControl &secCtrl, uint8_t objectIndex, uint8_t propertyId, uint8_t numberOfElements, uint16_t startIndex, uint8_t* data, uint8_t length) { - Serial.print("propertyValueWriteIndication: "); - Serial.println(propertyId); - if(propertyId == 5 && objectIndex == 3) - { - Serial.println("gotcha"); - } InterfaceObject* obj = getInterfaceObject(objectIndex); if(obj) obj->writeProperty((PropertyID)propertyId, startIndex, data, numberOfElements); @@ -258,11 +251,6 @@ void BauSystemB::propertyValueReadIndication(Priority priority, HopCountType hop else elementCount = 0; - if(objectIndex == 1 && propertyId == 27) - { - Serial.print(" "); - } - uint8_t data[size]; if(obj) obj->readProperty((PropertyID)propertyId, startIndex, elementCount, data); diff --git a/src/knx/group_object_table_object.cpp b/src/knx/group_object_table_object.cpp index a01350c..b610404 100644 --- a/src/knx/group_object_table_object.cpp +++ b/src/knx/group_object_table_object.cpp @@ -82,11 +82,11 @@ void GroupObjectTableObject::beforeStateChange(LoadState& newState) _tableData = (uint16_t*)data(); - /*if (!initGroupObjects()) + if (!initGroupObjects()) { newState = LS_ERROR; TableObject::errorCode(E_SOFTWARE_FAULT); - }*/ + } } bool GroupObjectTableObject::initGroupObjects() diff --git a/src/knx/memory.cpp b/src/knx/memory.cpp index 991f803..f146e67 100644 --- a/src/knx/memory.cpp +++ b/src/knx/memory.cpp @@ -138,7 +138,6 @@ void Memory::writeMemory() else bufferPos = pushWord(0, bufferPos); - //bufferPos = _tableObjects[i]->save(buffer); flashPos = _platform.writeNonVolatileMemory(flashPos, buffer, bufferPos - buffer); } diff --git a/src/knx/network_layer_device.cpp b/src/knx/network_layer_device.cpp index 5880a74..53e6266 100644 --- a/src/knx/network_layer_device.cpp +++ b/src/knx/network_layer_device.cpp @@ -82,7 +82,6 @@ void NetworkLayerDevice::dataIndication(AckType ack, AddressType addrType, uint1 return; _transportLayer.dataIndividualIndication(destination, hopType, priority, source, npdu.tpdu()); - Serial.println("NL:dI"); return; } diff --git a/src/knx/platform.cpp b/src/knx/platform.cpp index b2c4708..2674c3c 100644 --- a/src/knx/platform.cpp +++ b/src/knx/platform.cpp @@ -138,9 +138,6 @@ size_t Platform::getNonVolatileMemorySize() void Platform::commitNonVolatileMemory() { - Serial.println("commitNonVolatileMemory"); - - if(_bufferedEraseblockNumber > -1 && _bufferedEraseblockDirty) { writeBufferedEraseBlock(); diff --git a/src/knx/table_object.cpp b/src/knx/table_object.cpp index 27f61d3..44c504e 100644 --- a/src/knx/table_object.cpp +++ b/src/knx/table_object.cpp @@ -83,14 +83,9 @@ bool TableObject::allocTable(uint32_t size, bool doFill, uint8_t fillByte) if (doFill) { - //memset(_data, fillByte, size); - Serial.print("allocTable doFill: "); - Serial.print(fillByte); - Serial.print(" "); - Serial.println(size); - + uint32_t addr = _memory.toRelative(_data); for(int i = 0; i< size;i++) - _memory.writeMemory(_memory.toRelative(_data)+i, 1, &fillByte); + _memory.writeMemory(addr+i, 1, &fillByte); } _size = size; @@ -303,7 +298,6 @@ void TableObject::initializeProperties(size_t propertiesSize, Property** propert //TODO: missing // 23 PID_TABLE 3 / (3) - // 27 PID_MCB_TABLE 3 / 3 uint8_t ownPropertiesCount = sizeof(ownProperties) / sizeof(Property*);