mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
Add 230K4 baudrate support for GPS (#14192)
* Add support for 230K baudrate for GPS * Update CLI * Use invalidName for all instances
This commit is contained in:
parent
c2768d0409
commit
bbaf961edb
2 changed files with 3 additions and 2 deletions
|
@ -1348,7 +1348,7 @@ static void cliSerial(const char *cmdName, char *cmdline)
|
||||||
portConfig.msp_baudrateIndex = baudRateIndex;
|
portConfig.msp_baudrateIndex = baudRateIndex;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (baudRateIndex < BAUD_9600 || baudRateIndex > BAUD_115200) {
|
if (baudRateIndex < BAUD_9600 || baudRateIndex > BAUD_230400) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
portConfig.gps_baudrateIndex = baudRateIndex;
|
portConfig.gps_baudrateIndex = baudRateIndex;
|
||||||
|
@ -1528,7 +1528,7 @@ static void cliSerialPassthrough(const char *cmdName, char *cmdline)
|
||||||
cliPrintLinef("Invalid port%d %d", i + 1, ports[i].id);
|
cliPrintLinef("Invalid port%d %d", i + 1, ports[i].id);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
cliPrintLinef("Port%d: %s", i + 1, serialName(ports[i].id, "<invalid>"));
|
cliPrintLinef("Port%d: %s", i + 1, serialName(ports[i].id, invalidName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ typedef struct gpsInitData_s {
|
||||||
|
|
||||||
// UBX will cycle through these until valid data is received
|
// UBX will cycle through these until valid data is received
|
||||||
static const gpsInitData_t gpsInitData[] = {
|
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_115200, "$PUBX,41,1,0003,0001,115200,0*1E\r\n" },
|
||||||
{ BAUD_57600, "$PUBX,41,1,0003,0001,57600,0*2D\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" },
|
{ BAUD_38400, "$PUBX,41,1,0003,0001,38400,0*26\r\n" },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue