更新串口接收方式。

This commit is contained in:
xinyang
2019-07-16 12:15:14 +08:00
parent 829fb85b0c
commit 89344d1cd5
2 changed files with 6 additions and 15 deletions

View File

@@ -191,7 +191,7 @@ Serial::Serial(int nSpeed, char nEvent, int nBits, int nStop) :
nSpeed(nSpeed), nEvent(nEvent), nBits(nBits), nStop(nStop) {
if (wait_uart) {
LOGM("Wait for serial be ready!");
while (InitPort(nSpeed, nEvent, nBits, nStop) == false);
while (!InitPort(nSpeed, nEvent, nBits, nStop));
LOGM("Port set successfully!");
} else {
if (InitPort(nSpeed, nEvent, nBits, nStop)) {