Merge pull request #2044 from mkbel/fix_missing_mmu_attention

Fix missing mmu attention
This commit is contained in:
DRracer 2019-07-26 09:07:06 +02:00 committed by GitHub
commit 0687b8e4a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -423,9 +423,11 @@ void mmu_loop(void)
}
else if ((mmu_last_request + MMU_CMD_TIMEOUT) < _millis())
{ //resend request after timeout (5 min)
if (mmu_last_cmd >= MmuCmd::T0 && mmu_last_cmd <= MmuCmd::T4)
if (mmu_last_cmd != MmuCmd::None)
{
if (mmu_attempt_nr++ < MMU_MAX_RESEND_ATTEMPTS) {
if (mmu_attempt_nr++ < MMU_MAX_RESEND_ATTEMPTS &&
mmu_last_cmd >= MmuCmd::T0 && mmu_last_cmd <= MmuCmd::T4)
{
DEBUG_PRINTF_P(PSTR("MMU retry attempt nr. %d\n"), mmu_attempt_nr - 1);
mmu_cmd = mmu_last_cmd;
}