Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set uart baudrate only when init #185

Merged
merged 1 commit into from
Jan 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -1512,12 +1512,15 @@ void uart_baudrate_detect(void) {
// tramp protocol need 115200 bps.
return;
#else
if (seconds - msp_lst_rcv_sec >= 20) {
msp_lst_rcv_sec = seconds;
BAUDRATE++;
CFG_Back();
uart_set_baudrate(BAUDRATE);
Setting_Save();
static uint8_t once_done = 0;
if (once_done == 0) {
if (seconds - msp_lst_rcv_sec >= 10) {
msp_lst_rcv_sec = seconds;
BAUDRATE++;
CFG_Back();
Setting_Save();
once_done = 1;
}
}
#endif
}
Expand Down