Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnss: update supported baud rates #23415

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 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,36 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

#ifndef B500000
#define B500000 500000
#endif

case 500000: speed = B500000; break;

#ifndef B576000
#define B576000 576000
#endif

case 576000: speed = B576000; break;

#ifndef B921600
#define B921600 921600
#endif

case 921600: speed = B921600; break;

#ifndef B1000000
#define B1000000 1000000
#endif

case 1000000: speed = B1000000; break;

#ifndef B1500000
#define B1500000 1500000
#endif

case 1500000: speed = B1500000; break;

default:
speed = _baudrate;
PX4_WARN("Using non-standard baudrate: %lu", _baudrate);
Expand Down
24 changes: 24 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,36 @@ bool SerialImpl::configure()

case 460800: speed = B460800; break;

#ifndef B500000
#define B500000 500000
#endif

case 500000: speed = B500000; break;

#ifndef B576000
#define B576000 576000
#endif

case 576000: speed = B576000; break;

#ifndef B921600
#define B921600 921600
#endif

case 921600: speed = B921600; break;

#ifndef B1000000
#define B1000000 1000000
#endif

case 1000000: speed = B1000000; break;

#ifndef B1500000
#define B1500000 1500000
#endif

case 1500000: speed = B1500000; break;

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