Carlo Collodi / kangaroo

Dependencies:   QEI mbed

Revision:
28:21773a6fb6df
Parent:
26:53b793b7a82f
Child:
29:33c5c61f1068
Child:
35:a4e89e78d034
--- a/src/dynamics.cpp	Sun Nov 24 06:02:47 2013 +0000
+++ b/src/dynamics.cpp	Sun Nov 24 19:04:01 2013 +0000
@@ -2,7 +2,7 @@
 #include "include/dynamics.hpp"
 #include "include/motor.hpp"
 
-Kangaroo::Kangaroo(Motor M1, Motor M2, QEI e1, QEI e2):enc1(e1),enc2(e2),m1(M1),m2(M2){
+Kangaroo::Kangaroo(Motor &M1, Motor &M2, QEI &e1, QEI &e2):enc1(e1),enc2(e2),m1(M1),m2(M2){
     
 }
 
@@ -24,11 +24,12 @@
     
 }
 
-void Kangaroo::testEncoders(Serial pc){
-    pc.printf("hello world\n");
-    /*
-    pc.printf("clix:  %i, rots: %i\n",enc1.getPulses(), enc1.getRevolutions());
-    */
+void Kangaroo::testEncoders(Serial &pc){
+    //pc.printf("hello world\n");
     
-    //pc.printf("clix:  %i, rots: %i\n",enc2.getPulses(), enc2.getRevolutions());
+    pc.printf("motor1:  %i\n",m1.getPos());
+    pc.printf("clix1:  %i, rots1: %i\n",enc1.getPulses(), enc1.getRevolutions());
+    
+    pc.printf("motor2:  %i\n",m2.getPos());
+    pc.printf("clix2:  %i, rots2: %i\n",enc2.getPulses(), enc2.getRevolutions());
 }
\ No newline at end of file