Skip to content

Commit

Permalink
修复: 串口干扰问题
Browse files Browse the repository at this point in the history
  • Loading branch information
diylxy authored Nov 27, 2024
1 parent 4bc3c0e commit 1a9cd4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PowerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ int serialSetup()
tty.c_cflag |= CS8; // 8 bits per byte (most common)
// tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control (most common)
tty.c_cflag |= CREAD | CLOCAL; // Turn on READ & ignore ctrl lines (CLOCAL = 1)
tty.c_lflag &= ~ICANON;
tty.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
cfsetispeed(&tty, B115200);
cfsetospeed(&tty, B115200);
if (tcsetattr(serial_port, TCSANOW, &tty) != 0)
Expand Down

0 comments on commit 1a9cd4f

Please sign in to comment.