Skip to content

Commit

Permalink
gnss: update supported baud rates
Browse files Browse the repository at this point in the history
The Septentrio GNSS driver requires certain baud rates to test all the
supported baud rates of the receiver. Without these changes, certain
"non-standard" ones would print an error to the MAVLink console when the
driver was started through the console.
  • Loading branch information
ThomasFrans committed Jul 16, 2024
1 parent 8157504 commit cfb35b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions platforms/nuttx/src/px4/common/SerialImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,20 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

case 500000: speed = B500000; break;

case 576000: speed = B576000; break;

#ifndef B921600
#define B921600 921600
#endif

case 921600: speed = B921600; break;

case 1000000: speed = B1000000; break;

case 1500000: speed = B1500000; break;

default:
speed = _baudrate;
PX4_WARN("Using non-standard baudrate: %lu", _baudrate);
Expand Down
8 changes: 8 additions & 0 deletions platforms/posix/src/px4/common/SerialImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,20 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

case 500000: speed = B500000; break;

case 576000: speed = B576000; break;

#ifndef B921600
#define B921600 921600
#endif

case 921600: speed = B921600; break;

case 1000000: speed = B1000000; break;

case 1500000: speed = B1500000; break;

default:
speed = _baudrate;
PX4_WARN("Using non-standard baudrate: %u", _baudrate);
Expand Down

0 comments on commit cfb35b0

Please sign in to comment.