1
0
forked from fsfw/fsfw

important logic fix

This commit is contained in:
2021-01-10 14:27:57 +01:00
parent 1af28dd457
commit 69e931c07b
3 changed files with 48 additions and 7 deletions

View File

@ -322,12 +322,16 @@ void LocalDataPoolManager::handleChangeResetLogic(
continue;
}
// only one update recipient, we can reset changes status immediately.
if(changeInfo.updateCounter <= 1) {
toReset->setChanged(false);
}
if(changeInfo.currentUpdateCounter == 0) {
// All recipients have been notified, reset the changed flag.
if(changeInfo.currentUpdateCounter <= 1) {
toReset->setChanged(false);
changeInfo.currentUpdateCounter = 0;
}
// Not all recipiens have been notified yet, decrement.
else {
changeInfo.currentUpdateCounter--;
}