Makeblock-official / mBlock

base on scratch offline v2.0 by MIT, Learn more from Makeblock official website
http://www.makeblock.com
GNU General Public License v2.0
320 stars 228 forks source link

mBlock Arduino code generation for reset time and timer incorrect in wait until #44

Closed simmunity closed 7 years ago

simmunity commented 7 years ago

code uses uninitialized "currentTime" variable and never references "lastTime" variable in while statement: This is with release version mBlock downloaded 10/5/16

double dotRate;
dotRate = (200) / (60);

. . . // is currently: lastTime = millis()/1000.0; while(!((currentTime) > ((7) / (dotRate))));

// should be: lastTime = millis()/1000.0; while(!((millis()/1000.0) > (lastTime + (7) / (dotRate))));

bigeyex commented 7 years ago

close that for now since there's an update. Please reopen if the problem is still there.