소스 검색

Fix part ID response format

Part ID response format is probably hexidecimal.
Mateusz Bugdalski 13 년 전
부모
커밋
beb56582c1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lpc.c

+ 1 - 1
lpc.c

@@ -102,7 +102,7 @@ int lpc_read_partid(struct lpc_device *dev) {
   res = lpc_command("J\r\n");
   if(res!=0)
     return res;
-  scanf("%u\r\n", &partid);
+  scanf("0x%x\r\n", &partid);
   for(i=0; lpc_parts[i].name; i++)
     if(lpc_parts[i].part_id==partid)
       break;