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
Revision 51:4892c9238c33, committed 2014-04-03
- Comitter:
- soonerbot
- Date:
- Thu Apr 03 21:24:10 2014 +0000
- Parent:
- 50:ec6cc79132e8
- Commit message:
- update
Changed in this revision
| game.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/game.cpp	Thu Apr 03 19:42:44 2014 +0000
+++ b/game.cpp	Thu Apr 03 21:24:10 2014 +0000
@@ -334,15 +334,15 @@
 void gamePlayer::approachRig(){
     while(1){ 
         if(rigOnFire == 1){   
-            bot.smoothMove(290*11.625-(column*16),0,40);
+            bot.smoothMove(290*(11.625-(column*16)),0,40);
             bot.smoothMove(290*(3),0,40);
             bot.smoothMove((8000.0/360.0)*(-90),1,40);
         } else if(rigOnFire == 2){
-            bot.smoothMove(290*40-(column*16),0,40);
+            bot.smoothMove(290*(40-(column*16)),0,40);
             bot.smoothMove(290*(3),0,40);
             bot.smoothMove((8000.0/360.0)*(-90),1,40);
-        } else if(rigOnFire == 3){
-            bot.smoothMove(290*68.375-(column*16),0,40);
+        } else if(rigOnFire == 4){
+            bot.smoothMove(290*(68.375-(column*16)),0,40);
             bot.smoothMove(290*(3),0,40);
             bot.smoothMove((8000.0/360.0)*(-90),1,40);    
         }
--- a/main.cpp	Thu Apr 03 19:42:44 2014 +0000
+++ b/main.cpp	Thu Apr 03 21:24:10 2014 +0000
@@ -254,6 +254,9 @@
                 //game.runSecondRow();    //testing second and third row
                 //game.runSecondRow();
                 break;
+            case 'S':
+                game.approachRig();     //testing 
+                break;
             case 'Y':
                 /*bot.cont.start();
                 bot.cont.rampSpeed(40,40);
    