m3pi for proj2

Dependencies:   RemoteIR m3pi mbed-rtos mbed

Revision:
9:8c5229dfab82
Parent:
8:aff4290aacff
Child:
10:7eaaa891ab81
--- a/Controller.cpp	Wed May 10 09:33:18 2017 +0200
+++ b/Controller.cpp	Wed May 10 10:01:29 2017 +0200
@@ -22,14 +22,14 @@
 }
 int Controller::run() {
 
-    lightCommunication->mut.lock();
+    lightCommunication->mut->lock();
     if (lightCommunication->needsToStop()){
         car->stop();
-        lightCommunication->mut.unlock();
+        lightCommunication->mut->unlock();
     }else {
         current_left = lightCommunication->getLeft(current_left);
         current_right = lightCommunication->getRight(current_right);
-        lightCommunication->mut.unlock();
+        lightCommunication->mut->unlock();
         car->left_motor(current_left) ;
         car->right_motor(current_right) ;
     }