Skip to content

Commit

Permalink
Clean up changing baud rate logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezod committed Oct 15, 2023
1 parent bdff18e commit ecd900b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ int32_t gps_app(void* p) {

gps_uart_init_thread(gps_uart);
gps_uart->changing_baudrate = true;
view_port_update(view_port);
furi_mutex_release(gps_uart->mutex);
break;
case InputKeyRight:
gps_uart->speed_units++;
Expand All @@ -177,10 +175,11 @@ int32_t gps_app(void* p) {
}
}
}
if(!gps_uart->changing_baudrate) {
view_port_update(view_port);
furi_mutex_release(gps_uart->mutex);
} else {

view_port_update(view_port);
furi_mutex_release(gps_uart->mutex);

if(gps_uart->changing_baudrate) {
furi_delay_ms(1000);
gps_uart->changing_baudrate = false;
}
Expand Down

0 comments on commit ecd900b

Please sign in to comment.