diff --git a/libraries/AP_HAL_SITL/UARTDriver.cpp b/libraries/AP_HAL_SITL/UARTDriver.cpp index 7b556929ac1..0c4ea42736f 100644 --- a/libraries/AP_HAL_SITL/UARTDriver.cpp +++ b/libraries/AP_HAL_SITL/UARTDriver.cpp @@ -200,8 +200,6 @@ void UARTDriver::_begin(uint32_t baud, uint16_t rxSpace, uint16_t txSpace) _readbuffer.clear(); _writebuffer.clear(); } - - _set_nonblocking(_fd); } void UARTDriver::_end() @@ -734,11 +732,6 @@ bool UARTDriver::_select_check(int fd) return false; } -void UARTDriver::_set_nonblocking(int fd) -{ - unsigned v = fcntl(fd, F_GETFL, 0); - fcntl(fd, F_SETFL, v | O_NONBLOCK); -} bool UARTDriver::set_unbuffered_writes(bool on) { if (_fd == -1) { diff --git a/libraries/AP_HAL_SITL/UARTDriver.h b/libraries/AP_HAL_SITL/UARTDriver.h index 29a28eb09bf..d9aed9a7588 100644 --- a/libraries/AP_HAL_SITL/UARTDriver.h +++ b/libraries/AP_HAL_SITL/UARTDriver.h @@ -108,7 +108,7 @@ private: void _udp_start_multicast(const char *address, uint16_t port); void _check_connection(void); static bool _select_check(int ); - static void _set_nonblocking(int ); + bool set_speed(int speed) const; SITL_State *_sitlState;