Drew Paschal / Mbed 2 deprecated SelfBalancingPID

Dependencies:   mbed Motordriver

Revision:
1:bf71a7bd2d3e
Parent:
0:67f5b4041c15
Child:
2:ad080363a22c
--- a/main.cpp	Fri Mar 06 17:09:31 2015 +0000
+++ b/main.cpp	Fri Mar 06 17:12:47 2015 +0000
@@ -62,6 +62,7 @@
 #ifdef DEBUG
 void callback();                                                // Interrupt triggered function for serial communication
 #endif
+
 //////////////////////////////////////////////////////////////////
 // Main function
 int main()
@@ -80,6 +81,7 @@
 #endif
     }
 }
+
 /////////////////////////////////////////////////////////////////
 // Control function, implements PID
 void control()
@@ -98,6 +100,7 @@
     } else speed=0;                                             // If we've fallen over or are steady on top
     drive(speed);                                               // Write speed to the motors
 }
+
 //////////////////////////////////////////////////////////////////
 // Drive function
 void drive(float speed)
@@ -159,9 +162,9 @@
 #endif
 }
 
-#ifdef DEBUG
 /////////////////////////////////////////////////////////////////
 // Callback function to change values/gains
+#ifdef DEBUG
 void callback()
 {
     char val;                                                   // Needed for Serial communication (need to be global?)