main/task_sdcard.c

changeset 26
373a33699605
parent 17
f3451031d6c6
child 33
dd52aecfc19d
equal deleted inserted replaced
25:79ee940410de 26:373a33699605
103 f = fopen(filename, "a"); 103 f = fopen(filename, "a");
104 if (f) { 104 if (f) {
105 strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo); 105 strftime(strftime_buf, sizeof(strftime_buf), "%c", &timeinfo);
106 fprintf(f, "{\n"); 106 fprintf(f, "{\n");
107 fprintf(f, " \"brew\": [{\n"); 107 fprintf(f, " \"brew\": [{\n");
108 fprintf(f, " \"Recipe\":\"%s\",\n", recipe.Name); 108 fprintf(f, " \"Recipe\":\"%s %s\",\n", recipe.Code, recipe.Name);
109 fprintf(f, " \"Date\":\"%s\",\n", strftime_buf); 109 fprintf(f, " \"Date\":\"%s\",\n", strftime_buf);
110 fprintf(f, " \"brewdata\":[\n"); 110 fprintf(f, " \"brewdata\":[\n");
111 addcomma = false; 111 addcomma = false;
112 fclose(f); 112 fclose(f);
113 } else { 113 } else {

mercurial