|
@@ -173,7 +173,7 @@ drop_p: //enter DROP
|
|
|
return -1;
|
|
return -1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 2, 流式解析 JSON
|
|
|
|
|
|
|
+ // 2, JSON 流式解析
|
|
|
if(pComIO->recvMode != JSON) goto recv_p;
|
|
if(pComIO->recvMode != JSON) goto recv_p;
|
|
|
|
|
|
|
|
ret = lwjson_stream_parse(&pComIO->parser, ch);
|
|
ret = lwjson_stream_parse(&pComIO->parser, ch);
|
|
@@ -203,7 +203,7 @@ idle_p:
|
|
|
serial_clear_recv_buffer(pSerial); lwjson_stream_reset(&pComIO->parser); pComIO->jsonLastCharTick = 0;
|
|
serial_clear_recv_buffer(pSerial); lwjson_stream_reset(&pComIO->parser); pComIO->jsonLastCharTick = 0;
|
|
|
pComIO->recvMode = IDLE; // JSON 5: 转换到IDLE
|
|
pComIO->recvMode = IDLE; // JSON 5: 转换到IDLE
|
|
|
|
|
|
|
|
- // 3, 继续收下一字节
|
|
|
|
|
|
|
+ // 3, 等待下一个字节
|
|
|
recv_p: return 1;
|
|
recv_p: return 1;
|
|
|
}
|
|
}
|
|
|
|
|
|