Skip to content

Commit

Permalink
Add 230K4 baudrate support for GPS (betaflight#14192)
Browse files Browse the repository at this point in the history
* Add support for 230K baudrate for GPS

* Update CLI

* Use invalidName for all instances
  • Loading branch information
haslinghuis authored Jan 24, 2025
1 parent c2768d0 commit bbaf961
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/cli/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ static void cliSerial(const char *cmdName, char *cmdline)
portConfig.msp_baudrateIndex = baudRateIndex;
break;
case 1:
if (baudRateIndex < BAUD_9600 || baudRateIndex > BAUD_115200) {
if (baudRateIndex < BAUD_9600 || baudRateIndex > BAUD_230400) {
continue;
}
portConfig.gps_baudrateIndex = baudRateIndex;
Expand Down Expand Up @@ -1528,7 +1528,7 @@ static void cliSerialPassthrough(const char *cmdName, char *cmdline)
cliPrintLinef("Invalid port%d %d", i + 1, ports[i].id);
return;
} else {
cliPrintLinef("Port%d: %s", i + 1, serialName(ports[i].id, "<invalid>"));
cliPrintLinef("Port%d: %s", i + 1, serialName(ports[i].id, invalidName));
}
}

Expand Down
1 change: 1 addition & 0 deletions src/main/io/gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ typedef struct gpsInitData_s {

// UBX will cycle through these until valid data is received
static const gpsInitData_t gpsInitData[] = {
{ BAUD_230400, "$PUBX,41,1,0003,0001,230400,0*1C\r\n" },
{ BAUD_115200, "$PUBX,41,1,0003,0001,115200,0*1E\r\n" },
{ BAUD_57600, "$PUBX,41,1,0003,0001,57600,0*2D\r\n" },
{ BAUD_38400, "$PUBX,41,1,0003,0001,38400,0*26\r\n" },
Expand Down

0 comments on commit bbaf961

Please sign in to comment.