some tweaks for op divider

This commit is contained in:
Robin Müller 2021-09-17 13:07:43 +02:00
parent b1a56a71cd
commit 7d44aab98e
1 changed files with 2 additions and 4 deletions

View File

@ -7,15 +7,13 @@ PeriodicOperationDivider::PeriodicOperationDivider(uint32_t divider,
}
bool PeriodicOperationDivider::checkAndIncrement() {
counter++;
bool opNecessary = check();
if(opNecessary) {
if(resetAutomatically) {
counter = 0;
counter = 1;
}
return opNecessary;
}
counter++;
return opNecessary;
}