Codigo COmpleto

Dependencies:   CrazyflieController CrazyflieSensors USBDevice mbed

Revision:
4:8734045fab59
Parent:
1:0f858d1630a2
--- a/main.cpp	Wed Oct 17 11:46:07 2018 +0000
+++ b/main.cpp	Mon Nov 05 11:42:49 2018 +0000
@@ -15,7 +15,7 @@
 // Last interrupt time
 float last_time = 0.0f;
 int main()
-    {
+{
     // Wait 5s for safety
     wait (5);
     // Initialize attitude estimator
@@ -23,11 +23,9 @@
     // Start timer
     timer.start();
     // Run controller for only 5s
-    while (timer.read () <=5.0f)
-    {
+    while (timer.read () <=5.0f) {
         // Wait 5ms (200 Hz) to perfom next estimate and control update
-        while (( timer.read () -last_time ) <= 0.005f)
-        {
+        while (( timer.read () -last_time ) <= 0.005f) {
         }
         // Reset timmer
         last_time = timer.read ();
@@ -40,7 +38,6 @@
     }
     // Turn off all motors
     mixer.actuate (0.0f ,0.0f ,0.0f ,0.0f);
-    while (1)
-    {
+    while (1) {
     }
 }