mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
platforms: nuttx: SerialImpl: fix hang if baudrate is 0 (#23238)
This commit is contained in:
parent
5c64a3ed93
commit
2882e5c4e1
@ -74,6 +74,11 @@ bool SerialImpl::configure()
|
||||
int speed;
|
||||
|
||||
switch (_baudrate) {
|
||||
case 0:
|
||||
// special case, if baudrate is 0 it hangs entire system
|
||||
PX4_ERR("baudrate not specified");
|
||||
return false;
|
||||
|
||||
case 9600: speed = B9600; break;
|
||||
|
||||
case 19200: speed = B19200; break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user