clean up debug stuff, comments ...

This commit is contained in:
SirSydom 2022-02-14 18:31:02 +01:00
parent d34e7767c8
commit b5b228c417
6 changed files with 4 additions and 27 deletions

View File

@ -112,7 +112,6 @@ void BauSystemB::memoryWriteIndication(Priority priority, HopCountType hopType,
uint16_t memoryAddress, uint8_t * data) uint16_t memoryAddress, uint8_t * data)
{ {
_memory.writeMemory(memoryAddress, number, data); _memory.writeMemory(memoryAddress, number, data);
Serial.println("memoryWriteIndication");
if (_deviceObj.verifyMode()) if (_deviceObj.verifyMode())
memoryReadIndicationP(priority, hopType, asap, secCtrl, number, memoryAddress, data); 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, 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) 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); InterfaceObject* obj = getInterfaceObject(objectIndex);
if(obj) if(obj)
obj->writeProperty((PropertyID)propertyId, startIndex, data, numberOfElements); obj->writeProperty((PropertyID)propertyId, startIndex, data, numberOfElements);
@ -258,11 +251,6 @@ void BauSystemB::propertyValueReadIndication(Priority priority, HopCountType hop
else else
elementCount = 0; elementCount = 0;
if(objectIndex == 1 && propertyId == 27)
{
Serial.print(" ");
}
uint8_t data[size]; uint8_t data[size];
if(obj) if(obj)
obj->readProperty((PropertyID)propertyId, startIndex, elementCount, data); obj->readProperty((PropertyID)propertyId, startIndex, elementCount, data);

View File

@ -82,11 +82,11 @@ void GroupObjectTableObject::beforeStateChange(LoadState& newState)
_tableData = (uint16_t*)data(); _tableData = (uint16_t*)data();
/*if (!initGroupObjects()) if (!initGroupObjects())
{ {
newState = LS_ERROR; newState = LS_ERROR;
TableObject::errorCode(E_SOFTWARE_FAULT); TableObject::errorCode(E_SOFTWARE_FAULT);
}*/ }
} }
bool GroupObjectTableObject::initGroupObjects() bool GroupObjectTableObject::initGroupObjects()

View File

@ -138,7 +138,6 @@ void Memory::writeMemory()
else else
bufferPos = pushWord(0, bufferPos); bufferPos = pushWord(0, bufferPos);
//bufferPos = _tableObjects[i]->save(buffer);
flashPos = _platform.writeNonVolatileMemory(flashPos, buffer, bufferPos - buffer); flashPos = _platform.writeNonVolatileMemory(flashPos, buffer, bufferPos - buffer);
} }

View File

@ -82,7 +82,6 @@ void NetworkLayerDevice::dataIndication(AckType ack, AddressType addrType, uint1
return; return;
_transportLayer.dataIndividualIndication(destination, hopType, priority, source, npdu.tpdu()); _transportLayer.dataIndividualIndication(destination, hopType, priority, source, npdu.tpdu());
Serial.println("NL:dI");
return; return;
} }

View File

@ -138,9 +138,6 @@ size_t Platform::getNonVolatileMemorySize()
void Platform::commitNonVolatileMemory() void Platform::commitNonVolatileMemory()
{ {
Serial.println("commitNonVolatileMemory");
if(_bufferedEraseblockNumber > -1 && _bufferedEraseblockDirty) if(_bufferedEraseblockNumber > -1 && _bufferedEraseblockDirty)
{ {
writeBufferedEraseBlock(); writeBufferedEraseBlock();

View File

@ -83,14 +83,9 @@ bool TableObject::allocTable(uint32_t size, bool doFill, uint8_t fillByte)
if (doFill) if (doFill)
{ {
//memset(_data, fillByte, size); uint32_t addr = _memory.toRelative(_data);
Serial.print("allocTable doFill: ");
Serial.print(fillByte);
Serial.print(" ");
Serial.println(size);
for(int i = 0; i< size;i++) for(int i = 0; i< size;i++)
_memory.writeMemory(_memory.toRelative(_data)+i, 1, &fillByte); _memory.writeMemory(addr+i, 1, &fillByte);
} }
_size = size; _size = size;
@ -303,7 +298,6 @@ void TableObject::initializeProperties(size_t propertiesSize, Property** propert
//TODO: missing //TODO: missing
// 23 PID_TABLE 3 / (3) // 23 PID_TABLE 3 / (3)
// 27 PID_MCB_TABLE 3 / 3
uint8_t ownPropertiesCount = sizeof(ownProperties) / sizeof(Property*); uint8_t ownPropertiesCount = sizeof(ownProperties) / sizeof(Property*);