Luis Miguel Castro Tenjica / Mbed 2 deprecated 02_LAB_serial_protocol

Dependencies:   mbed

Fork of 02_LAB_serial_protocol by ferney alberto beltran molina

Revision:
9:3a8624147a4c
Parent:
8:cd9b52716920
Child:
10:846a16647b9a
diff -r cd9b52716920 -r 3a8624147a4c main.cpp
--- a/main.cpp	Sat Sep 30 14:29:33 2017 +0000
+++ b/main.cpp	Sat Sep 30 14:33:24 2017 +0000
@@ -77,20 +77,32 @@
         
      
 }
-void command_led(int tm)
+void command_led(uint8_t tm)
 {
+  
   //EJEMPLO DE COMANDO 
-                led=1;  
+      #if DEBUG
+        command.printf("%i, segundos", tm);
+    #endif
+              led=1;  
                 wait(tm);
                 led=0;   
                  
 }
 void command_exe()
 {
+    #if DEBUG
+        command.printf("Ejecutando comando: ");
+    #endif
     
 switch (buffer_command[COMM_N]){
 
-case (LED_NC): command_led(buffer_command[INITPARAMETER]);
+case (LED_NC): 
+    #if DEBUG
+        command.printf("LED on\n");
+    #endif
+
+    command_led(buffer_command[INITPARAMETER]);
 break;
 case (DOT_NC):
     #if DEBUG