Carlo Collodi / kangaroo

Dependencies:   QEI mbed

Revision:
26:53b793b7a82f
Parent:
25:8a34b8d6cc6e
Child:
28:21773a6fb6df
--- a/src/dynamics.cpp	Tue Nov 19 20:42:01 2013 +0000
+++ b/src/dynamics.cpp	Sun Nov 24 06:00:21 2013 +0000
@@ -2,11 +2,11 @@
 #include "include/dynamics.hpp"
 #include "include/motor.hpp"
 
-Kangaroo::Kangaroo(Motor M1, Motor M2, QEI e1, QEI e2):m1(M1),m2(M2),enc1(e1),enc2(e2){
+Kangaroo::Kangaroo(Motor M1, Motor M2, QEI e1, QEI e2):enc1(e1),enc2(e2),m1(M1),m2(M2){
     
 }
 
-Kangaroo::zero(){
+void Kangaroo::zero(){
     m1.setVel(-.002);//wait for the legs to go to stopping points
     m2.setVel(-.002);
     wait(1);
@@ -22,4 +22,13 @@
     }
     
     
+}
+
+void Kangaroo::testEncoders(Serial pc){
+    pc.printf("hello world\n");
+    /*
+    pc.printf("clix:  %i, rots: %i\n",enc1.getPulses(), enc1.getRevolutions());
+    */
+    
+    //pc.printf("clix:  %i, rots: %i\n",enc2.getPulses(), enc2.getRevolutions());
 }
\ No newline at end of file