Elektronikprojekt Grupp 13 / Mbed OS test_fft_grp13

Dependencies:   mbed-dsp

Fork of mbed-os-example-blinky by Elektronikprojekt Grupp 13

Revision:
48:d147eba868c8
Parent:
47:b9abb45fde85
Child:
49:2632e3e89576
--- a/main.cpp	Wed Mar 29 15:50:15 2017 +0000
+++ b/main.cpp	Thu Mar 30 10:39:04 2017 +0000
@@ -5,36 +5,36 @@
 // State machine
 int    STATE;
 //const int NONE     = -1;
-const int IDLE_LISTEN  = 0;
-const int CALC_DELTA_T     = 1;
-const int CALC_DELTA_S     = 2;
-const int CALC_DELTA_PHI     = 3;
-const int SEND     = 4;
+const int IDLE  = 0;
+const int LISTEN = 1;
+const int CALC  = 2;
+const int SEND   = 3;
+const int ERROR = 4;
 //const int WAIT     = 9;
 
 // main() runs in its own thread in the OS
 int main() {
-    STATE = IDLE_LISTEN;
+    STATE = IDLE;
     while (true) {
         switch (STATE) {
             
-            case IDLE_LISTEN:
+            case IDLE:
             //code here
-            STATE = CALC_DELTA_T;
+            STATE = LISTEN; //next state
             break;
             
-            case CALC_DELTA_T:
+            case LISTEN:
+            //code here
+            break;
+            
+            case CALC:
             //code here
             break; 
 
-            case CALC_DELTA_S:
+            case ERROR:
             //code here
             break;
             
-            case CALC_DELTA_PHI:
-            // code here
-            break;
-            
             case SEND:
             // code here
             break;