Eimantas Bernotavicius / Mbed 2 deprecated Buggy_Project

Dependencies:   QEI mbed

Revision:
4:48d390356fba
Parent:
3:c9df852ad9ac
diff -r c9df852ad9ac -r 48d390356fba encoderBase.cpp
--- a/encoderBase.cpp	Wed Feb 21 11:55:29 2018 +0000
+++ b/encoderBase.cpp	Thu Feb 22 17:01:00 2018 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "QEI.h"
 #include "pins.h"
-#include "constants.h"
+#include "constants.cpp"
 
 
 //these lines setup the encoders for both wheels
@@ -33,3 +33,10 @@
             return (wheelRight.velocity(pulseRight)-wheelLeft.velocity(pulseLeft))/WHEEL_DISTANCE;
             }
     }buggy;
+    //temp functions to get the encoder speed
+int encoderVelocityLeft(){
+    return wheelLeft.velocity(encoderLeft.getPulses());
+    }
+int encoderVelocityRight(){
+    return wheelRight.velocity(encoderRight.getPulses());
+    }
\ No newline at end of file