Sooner Competitive Robotics / Mbed 2 deprecated IEEE_14_Freescale

Dependencies:   mbed

Fork of IEEE_14_Freescale by IEEE 2014 Mbed

Files at this revision

API Documentation at this revision

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);