Huseyin Berkay Berabi / GA-Final

Dependencies:   mbed-dev

Fork of GA-Berkay_Alex by Alejandro Ungria Hirte

Revision:
1:346279def7ac
Parent:
0:a3b83d366423
Child:
2:5adf0b785944
--- a/main_minimal.cpp	Wed Dec 06 21:35:45 2017 +0000
+++ b/main_minimal.cpp	Sat Dec 09 16:02:58 2017 +0000
@@ -126,27 +126,11 @@
         } 
         else if (node->isBaseStation()){
              
-            //pc.readcommand(executeOrder);
-    
              // EXECUTE THIS IF A BASE STATION
             pc.readcommand(executeOrder);
-            wait_ms(10);
+                        wait_ms(80);
+
             wdt.kick();
-            /*
-            while (1)
-            {
-                if (pc.readable())
-                {
-                    pc.scanf( "%s" , command_str );
-                    break;
-                }
-            }
-            */
-            //wait_ms(3);
-            //pc.printf("Command Received: %s", command_str);
-            //wait_ms(3);
-            //executeOrder(command_str);
-            //wait_ms(3);
         }
         else { // All Anchor Action is in the Interrupt functions!
             // EXECUTE THIS IF AN ANCHOR
@@ -261,10 +245,7 @@
         baseStationNode.sendOrder(dest3, NOT_USED, BECOME_ANCHOR, NOT_USED, Node::SWITCH_TYPE);
         
     } 
-    else
-    {
-    pc.printf("ERROR ------  This is an invalid command\n"); 
-    }
+  
 }
 
 #pragma Otime // Compiler optimize Runtime at the cost of image size
@@ -337,7 +318,7 @@
 
 void rangeAndDisplayOne(uint8_t addr){
     beaconNode.requestRanging(addr); 
-    pc.printf("o error2 ? %f(%f) \r\n", beaconNode.getDistance(addr), beaconNode.getSignalStrength(addr));
+    pc.printf("%f(%f) \r\n", beaconNode.getDistance(addr), beaconNode.getSignalStrength(addr));
 }