Merge pull request #4444 from andrethomas/patch-2

Remove assumption of 100% to report correctly
This commit is contained in:
Theo Arends 2018-11-25 16:59:51 +01:00 committed by GitHub
commit 5ebef45465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -2799,9 +2799,5 @@ void loop(void)
delay(my_activity /2); // If wifi down and my_activity > setoption36 then force loop delay to 1/3 of my_activity period
}
}
if (my_activity < (uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]) {
UpdateLoopLoadAvg(my_activity);
} else {
UpdateLoopLoadAvg((uint32_t)Settings.param[P_LOOP_SLEEP_DELAY]); // Assume 100% loop cycle ratio
}
UpdateLoopLoadAvg(my_activity);
}