]> git.llucax.com Git - z.facultad/66.09/etherled.git/blobdiff - src/elp.c
Emprolija un poco el retarno, no necesita más usar el multiplicador.
[z.facultad/66.09/etherled.git] / src / elp.c
index 69e349065b0e72c2b7fe57303c15107870617453..5f03c8aa95756235577ae7950e573049410182a6 100644 (file)
--- a/src/elp.c
+++ b/src/elp.c
@@ -75,10 +75,10 @@ byte elp_read_process_command()
         case ELP_VAR_DELAY:
             // Si es GET, sólo calculamos tamaño de respuesta
             if (!elp_command.set)
-                return len + sizeof(leds_delay);
+                return len + LEDS_DELAY_SIZE;
             // Si es SET procesamos
-            netdev_read_start(sizeof(leds_delay));
-            leds_delay = udp_read_byte();
+            netdev_read_start(LEDS_DELAY_SIZE);
+            leds_delay_set(udp_read_byte());
             netdev_read_end();
             return len;
 
@@ -121,8 +121,8 @@ void elp_write_response()
             break;
 
         case ELP_VAR_DELAY:
-            netdev_write_start(sizeof(leds_delay));
-            udp_write_byte(leds_delay);
+            netdev_write_start(LEDS_DELAY_SIZE);
+            udp_write_byte(leds_delay_get());
             netdev_write_end();
             break;
     }