Fix the delay condition bug when overflow
The original expression will cause bug when overflow.
This commit is contained in:
		@@ -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)
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user