for ros integration

Dependencies:   wheelchaircontrolRos

Fork of wheelchaircontrolrealtime by ryan lin

Revision:
11:2cb176f5b345
Parent:
9:90bc440405b6
--- a/main.cpp	Thu Aug 30 03:44:22 2018 +0000
+++ b/main.cpp	Fri Aug 31 19:42:08 2018 +0000
@@ -13,7 +13,12 @@
 Timer t;
 Thread thread;
 EventQueue queue;
-Wheelchair smart(xDir,yDir, &pc, &t);
+
+QEI wheel(D0, D1, NC, 1200);
+DigitalIn pt3(D1, PullUp);
+DigitalIn pt4(D0, PullUp);
+
+Wheelchair smart(xDir,yDir, &pc, &t, &wheel);
 
 char c;
 bool manual = false;
@@ -133,14 +138,24 @@
                     }
                 }
             }
-
+        else if( c == 'k') {
+            smart.kitchen();
+            
+            c = 'z';
+            }
+        else if( c == 'i') {
+            smart.desk();
+            }
+        else if( c == 'c') {
+            smart.back();
+            }
             else {
                 pc.printf("none \n");
                 smart.stop();
             }
             received = false;
         }
-
+        
         else {
             //        pc.printf("Nothing pressed \n");
             smart.stop();