ESE350 project, Spring 2016, University of Pennsylvania

Dependencies:   Adafruit9-DOf Receiver mbed-rtos mbed

Revision:
36:40b134328376
Parent:
34:eaea0ae92dfa
Child:
37:a983eb9fd9c5
diff -r 35997980a8ba -r 40b134328376 main.cpp
--- a/main.cpp	Tue Apr 26 18:50:55 2016 +0000
+++ b/main.cpp	Fri Apr 29 18:24:15 2016 +0000
@@ -7,8 +7,9 @@
 
 Serial pc(USBTX, USBRX);
 MRF24J40 mrf(p11, p12, p13, p14, p21);
-Timer timer; // timer ;) 
-Quadcopter myQuadcopter(&pc, &mrf, &timer); // instantiate Quadcopter object
+Timer timer; // timer ;)
+Mutex desired_mutex;
+Quadcopter myQuadcopter(&pc, &mrf, &timer, &desired_mutex); // instantiate Quadcopter object
 
 // pwm outputs for the 4 motors (motor 1 points into x direction, 2 into y direction, 3 -x direction, -y direction
 PwmOut motor_1(p23);
@@ -114,7 +115,7 @@
     motor_3.period(0.01);
     motor_4.period(0.01);
 
-    Thread threadR(rc_thread);
+    Thread thread_rc(rc_thread);
 
     int startLoop = 0;
 
@@ -132,8 +133,7 @@
 
     // TODO assign priorities to threads, test if it really works as we expect
     Thread battery(battery_thread);
-    Thread thread(controller_thread);
-
+    Thread controller(controller_thread);
     // TODO is this needed?
     while (1);
 }