Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of IEEE_14_Freescale by
Diff: game.cpp
- Revision:
- 39:e61dd30febfc
- Parent:
- 38:3062838df0ce
- Child:
- 45:9c520ebc38e0
--- a/game.cpp Fri Mar 28 21:53:04 2014 +0000 +++ b/game.cpp Fri Mar 28 22:47:52 2014 +0000 @@ -164,7 +164,7 @@ waveGaps[row]=column; //check if this is really the center of the gap bot.smoothMove(290*4,0,40); - bot.pingLeft.getStablePoll(); + gapCheck = bot.pingLeft.getStablePoll(); if((gapCheck > 15.0) || (gapCheck < -1.5)){ bot.smoothMove(290*-4,0,40); }else{ @@ -186,7 +186,7 @@ waveGaps[row]=i; //check if this is really the center of the gap bot.smoothMove(290*4,0,40); - bot.pingLeft.getStablePoll(); + gapCheck = bot.pingLeft.getStablePoll(); if((gapCheck > 15.0) || (gapCheck < -1.5)){ bot.smoothMove(290*-4,0,40); }else{ @@ -229,7 +229,7 @@ } //haven't found, check other direction if(waveGaps[row]==-1){ - bot.smoothMove(290*(16*(column-5)+3),0,40); + bot.smoothMove(290*(16*(column-5)),0,40); while(1){ oldWallDist = bot.pingLeft.getStablePoll(); if(oldWallDist>0.0 || oldWallDist<-1.5) @@ -256,7 +256,7 @@ bot.smoothMove((8000.0/360.0)*(-desiredHeading),1,40); //check if this is really the center of the gap bot.smoothMove(290*4,0,40); - bot.pingLeft.getStablePoll(); + gapCheck = bot.pingLeft.getStablePoll(); if((gapCheck > 15.0) || (gapCheck < -1.5)){ bot.smoothMove(290*-4,0,40); }else{ @@ -299,7 +299,7 @@ if(waveGaps[row]>=0){ //check if this is really the center of the gap bot.smoothMove(290*4,0,40); - bot.pingLeft.getStablePoll(); + gapCheck = bot.pingLeft.getStablePoll(); if((gapCheck > 15.0) || (gapCheck < -1.5)){ bot.smoothMove(290*-4,0,40); }else{