Changeset 104 for tools/ListenToArduino/main.c
- Timestamp:
- 09/22/09 11:24:48 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/ListenToArduino/main.c
r103 r104 117 117 118 118 FILE *outfile; 119 outfile = openOutfile(myPath); 120 121 if (outfile == NULL) {return -1;} 119 122 120 123 121 char outstring[400]; … … 133 131 buf[res]=0; /* set end of string, so we can printf */ 134 132 135 if (strncmp (buf,"[Temp,",6) != 0) continue; 133 134 if (strncmp (buf,"[Temp,",6) != 0) continue; 135 136 outfile = openOutfile(myPath); 137 if (outfile == NULL) {return -1;} 136 138 137 139 time_t rawtime; … … 160 162 fprintf(outfile, "%s", outstring); 161 163 fflush(outfile); 164 fclose(outfile); 162 165 163 166 if (poll_stdin_time(1500000)==1) { … … 172 175 /* restore the old port settings */ 173 176 tcsetattr(fd,TCSANOW,&oldtio); 174 fclose(outfile);175 177 176 178 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.