Skip to content

Commit

Permalink
Merge branch 'set-uart-baudrate-only-once' into hdzero_eco_vtx
Browse files Browse the repository at this point in the history
  • Loading branch information
ligenxxxx committed Feb 28, 2024
2 parents 88e7fea + c58fc12 commit a29d2c1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,12 +1543,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

0 comments on commit a29d2c1

Please sign in to comment.