some fixes and debugs

This commit is contained in:
SirSydom 2022-02-14 11:05:47 +01:00
parent 9098478614
commit 7fae86e3c2
2 changed files with 14 additions and 1 deletions

View File

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

View File

@ -82,7 +82,16 @@ bool TableObject::allocTable(uint32_t size, bool doFill, uint8_t fillByte)
return false;
if (doFill)
memset(_data, fillByte, size);
{
//memset(_data, fillByte, size);
Serial.print("allocTable doFill: ");
Serial.print(fillByte);
Serial.print(" ");
Serial.println(size);
for(int i = 0; i< size;i++)
_memory.writeMemory(_memory.toRelative(_data)+i, 1, &fillByte);
}
_size = size;
@ -139,6 +148,7 @@ void TableObject::loadEventLoading(const uint8_t* data)
case LE_START_LOADING:
break;
case LE_LOAD_COMPLETED:
_memory.saveMemory();
loadState(LS_LOADED);
break;
case LE_UNLOAD: