Skip to content

Commit ecd900b

Browse files
committed
Clean up changing baud rate logic.
1 parent bdff18e commit ecd900b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

gps.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ int32_t gps_app(void* p) {
159159

160160
gps_uart_init_thread(gps_uart);
161161
gps_uart->changing_baudrate = true;
162-
view_port_update(view_port);
163-
furi_mutex_release(gps_uart->mutex);
164162
break;
165163
case InputKeyRight:
166164
gps_uart->speed_units++;
@@ -177,10 +175,11 @@ int32_t gps_app(void* p) {
177175
}
178176
}
179177
}
180-
if(!gps_uart->changing_baudrate) {
181-
view_port_update(view_port);
182-
furi_mutex_release(gps_uart->mutex);
183-
} else {
178+
179+
view_port_update(view_port);
180+
furi_mutex_release(gps_uart->mutex);
181+
182+
if(gps_uart->changing_baudrate) {
184183
furi_delay_ms(1000);
185184
gps_uart->changing_baudrate = false;
186185
}

0 commit comments

Comments
 (0)