Browse Source

Misc changes to FW

Max Nuding 12 years ago
parent
commit
b8b20b128c
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      HardwareEmulator/main.c

+ 8
- 0
HardwareEmulator/main.c View File

202
 					} else if (size == -1) {
202
 					} else if (size == -1) {
203
 						printf("Could not read from psuedo terminal!\n");
203
 						printf("Could not read from psuedo terminal!\n");
204
 						return -1;
204
 						return -1;
205
+					} else if (size == 0) {
206
+						//printf("No data for number %d\n", d);
207
+						break;
205
 					}
208
 					}
206
 				}
209
 				}
207
 				data[d] = c;
210
 				data[d] = c;
209
 			printf(" Done!\n");
212
 			printf(" Done!\n");
210
 
213
 
211
 			addFrame(data);
214
 			addFrame(data);
215
+			c = OK;
216
+			if(serialWriteTry(&c, 1)){
217
+				printf("Could not write to pseudo terminal\n");
218
+				return -1;
219
+			}
212
 		}
220
 		}
213
 	}
221
 	}
214
 
222
 

Loading…
Cancel
Save