Skip to content

Commit

Permalink
Change so memoryClean and memoryDirty signals properly handle packetn…
Browse files Browse the repository at this point in the history
…ak, and whole table writes.
  • Loading branch information
malcom2073 committed Feb 16, 2014
1 parent 235a282 commit 6d59bd4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions plugins/freeems/freeemscomms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@ int FreeEmsComms::burnBlockFromRamToFlash(unsigned short location,unsigned short
m_sequenceNumber++;
m_reqList.append(req);

if (size == 0)
{
size = emsData.getLocalRamBlock(location).size();
}

for (int i=emsData.getLocalRamBlockInfo(location)->ramAddress + offset;i<emsData.getLocalRamBlockInfo(location)->ramAddress+offset+size;i++)
{
if (m_dirtyRamAddresses.contains(i))
Expand Down Expand Up @@ -1728,6 +1733,22 @@ void FreeEmsComms::packetNakedRec(unsigned short payloadid,QByteArray header,QBy
m_locIdToConfigListMap[locid][i]->setData(emsData.getLocalRamBlock(locid));
}
}

unsigned short offset = m_currentWaitingRequest.args[1].toUInt();
unsigned short size = m_currentWaitingRequest.args[2].toUInt();
unsigned short ramaddress = emsData.getLocalRamBlockInfo(locid)->ramAddress;
for (int i=ramaddress+offset;i<ramaddress+offset+size;i++)
{
if (m_dirtyRamAddresses.contains(i))
{
m_dirtyRamAddresses.removeOne(i);
}
}
if (m_dirtyRamAddresses.size() == 0)
{
emit memoryClean();
}

}
if (payloadid == m_payloadWaitingForResponse+1)
{
Expand Down

0 comments on commit 6d59bd4

Please sign in to comment.