3/26/16 12:25 am JJ

Dependents:   steppertest R5 2016 Robotics Team 1

Fork of scanner by David Vasquez

Revision:
8:32a445ae1d72
Parent:
7:52c4be3bfc1b
Child:
9:bae63bc84829
Child:
10:6a630acaeadb
--- a/scanner.cpp	Sat Mar 26 05:09:29 2016 +0000
+++ b/scanner.cpp	Sat Mar 26 05:26:17 2016 +0000
@@ -1,7 +1,7 @@
 #include "scanner.h"
 #include "mbed.h"
 #include "LongRangeSensor.h"
-#include "VL6180x.h"
+#include "ShortRangeSensor.h"
 #include "StepperDrive.h"
 #include <stack>
 
@@ -16,7 +16,7 @@
 // DESCRIPTION:
 //      Constructor.
 Scanner::Scanner(Serial &pc1, StepperDrive &_drive, PinName _servoL, PinName _servoR,
-    VL6180x &_shortRangeL, VL6180x &_shortRangeR, LongRangeSensor &_longRangeL,
+    ShortRangeSensor &_shortRangeL, ShortRangeSensor &_shortRangeR, LongRangeSensor &_longRangeL,
     LongRangeSensor &_longRangeR, float _period) : pc(pc1), drive(_drive), servoL(_servoL),
     servoR(_servoR), shortRangeL(_shortRangeL),
     shortRangeR(_shortRangeR), longRangeL(_longRangeL),
@@ -122,10 +122,10 @@
     
     // This if statement moves the robot forward in order
     // to continue the hunt of the peg.
-    while(distShortL == 0 && distShortR == 0 && tempStepCount < 34)
+/*    while(distShortL == 0 && distShortR == 0 && tempStepCount < 34)
     {
         drive.move(0.25, 0.0);
-    }  
+    }*/  
     
     // Adjust the comparsion for floats with
     // regards to the sensor data.