keuzeproject

Dependencies:   mbed HTTPServer RemoteIR mbed-rtos SDFileSystem EthernetInterface mbed-rpc

Revision:
14:2b63c0f795cb
Parent:
10:da52ff0b93c0
diff -r 12749822ba56 -r 2b63c0f795cb db.cpp
--- a/db.cpp	Tue Dec 03 16:02:15 2013 +0000
+++ b/db.cpp	Tue Dec 03 16:21:52 2013 +0000
@@ -57,8 +57,10 @@
     }
 }
 
-void db_find_tuple(FILE *fread, int id_to_find, char *tuple_name, char *tuple_code, char *tuple_bitlength, char *tuple_format)
+void db_find_tuple(int id_to_find, char *tuple_name, char *tuple_code, char *tuple_bitlength, char *tuple_format)
 {
+    FILE *fread = fopen("/sd/SmartRemote/db.txt", "r");
+    
     char tuple_id[128];
     int id;
 
@@ -80,7 +82,8 @@
     }
 
     printf("Tuple Found: |%s| \t |%s| \t |%s| \t |%s| \t |%s|\n", tuple_id, tuple_name, tuple_code, tuple_bitlength, tuple_format);
-
+    
+    fclose(fread);
 }
 
 void db_get_tuple(FILE *fread, char *id_str, char *name_str, char *code_str, char *bitlength_str, char *format_str)