Elektronikprojekt Grupp 13 / Mbed OS test_fft_grp13

Dependencies:   mbed-dsp

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

Revision:
46:5ad0d78d045e
Parent:
45:b1b431753adc
Child:
47:b9abb45fde85
--- a/main.cpp	Wed Mar 29 15:09:04 2017 +0000
+++ b/main.cpp	Wed Mar 29 15:47:30 2017 +0000
@@ -5,27 +5,40 @@
 // State machine
 int    STATE;
 const int NONE     = -1;
-const int TEST  = 0;
-const int SEND     = 1;
-const int DSP1     = 2;
-const int DSP2     = 3;
-const int DSP3     = 4;
+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 WAIT     = 9;
 
 // main() runs in its own thread in the OS
 int main() {
-    STATE = NONE;
+    STATE = IDLE_LISTEN;
     while (true) {
         switch (STATE) {
             
-            case SEND:
-            //send code here
+            case IDLE_LISTEN:
+            //code here
+            STATE = CALC_DELTA_T
             break;
             
-            case TEST:
+            case CALC_DELTA_T:
             //code here
             break; 
+
+            case CALC_DELTA_S:
+            //code here
+            break;
             
+            case CALC_DELTA_PHI:
+            // code here
+            break;
+            
+            case SEND:
+            // code here
+            break;
+        
             }
     }
 }