Fix the delay condition bug when overflow
The original expression will cause bug when overflow.
This commit is contained in:
parent
fda398046e
commit
7ef9c29fa8
@ -275,7 +275,7 @@ unsigned long delayBeforeTime = 0;
|
||||
byte delay_background(unsigned delayTime, byte fromType){ //fromType : 4 autoCWKey -> Check Paddle
|
||||
delayBeforeTime = millis();
|
||||
|
||||
while (millis() <= delayBeforeTime + delayTime) {
|
||||
while (millis() - delayBeforeTime <= delayTime) {
|
||||
|
||||
if (fromType == 4)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user