posilani dat

Dependencies:   FatFileSystemCpp mbed PowerControl USBHostLite

Revision:
10:fdf9ca254549
Parent:
9:8839ecc02e0e
Child:
11:137108e3403e
--- a/main.cpp	Wed Apr 29 08:01:37 2015 +0000
+++ b/main.cpp	Wed May 13 14:41:50 2015 +0000
@@ -215,14 +215,17 @@
 void get_data(void)
 {
     int i;
-    char name[20];
+    char name[30];
 
     for (i = 0; i < swimmer_id; i++) {
         sprintf(name, "/SDCard/swimmer%d.txt", i);
+        printf("Sending %s\r\n", name);
         if (wifi.sendFile(name, i)) {
             leds_error();
             printf("\nUnable to send data\n\r");
-        }  
+        } else {
+            printf("\r\nSwimmer %d finished\n\r");
+        }
     }
 }
 
@@ -240,7 +243,8 @@
 
     sprintf(fname, "/SDCard/swimmer%d.txt", swimmer_id);
     //remove(fname);  //remove file to avoid reading old data
-    
+ 
+
     leds_off();
     printf("Ready...\n\r");