浏览代码

Misc changes to FW

Max Nuding 13 年前
父节点
当前提交
b8b20b128c
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
    0
      HardwareEmulator/main.c

+ 8
- 0
HardwareEmulator/main.c 查看文件

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
 

正在加载...
取消
保存