mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-08-21 16:00:35 +08:00
platforms: nuttx: SerialImpl: fix hang if baudrate is 0 (#23238)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user