Skip to content

Commit 21264f7

Browse files
committed
Use uart given as parameter to read line from GPS
Previously the uart paramter has been ignored and UART1 has always been used to read a line from GPS.
1 parent 137f3d9 commit 21264f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hardware/gps/Fragments/log_to_console.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ char *readLine(uart_port_t uart) {
88
int size;
99
char *ptr = line;
1010
while(1) {
11-
size = uart_read_bytes(UART_NUM_1, (unsigned char *)ptr, 1, portMAX_DELAY);
11+
size = uart_read_bytes(uart, (unsigned char *)ptr, 1, portMAX_DELAY);
1212
if (size == 1) {
1313
if (*ptr == '\n') {
1414
*ptr = 0;

hardware/gps/gps/main/gps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ char *readLine(uart_port_t uart) {
1111
int size;
1212
char *ptr = line;
1313
while(1) {
14-
size = uart_read_bytes(UART_NUM_1, (unsigned char *)ptr, 1, portMAX_DELAY);
14+
size = uart_read_bytes(uart, (unsigned char *)ptr, 1, portMAX_DELAY);
1515
if (size == 1) {
1616
if (*ptr == '\n') {
1717
ptr++;

0 commit comments

Comments
 (0)