From 6bdbe530242206ec412e0559028dd5f09d71eceb Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Thu, 30 Nov 2017 12:17:49 -0800 Subject: [PATCH] AP_HAL_SITL: fix compile error for Windows/Cygwin builds termios2 not available on cygwin. This needs a re-think for cygwin. For now let's just hide it by letting it be declared empty by the virtual and totally bypass it in the cygwin build. --- libraries/AP_HAL_SITL/UARTDriver.h | 6 +++--- libraries/AP_HAL_SITL/UART_utils.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_HAL_SITL/UARTDriver.h b/libraries/AP_HAL_SITL/UARTDriver.h index 1df815b55c..fbade066f2 100644 --- a/libraries/AP_HAL_SITL/UARTDriver.h +++ b/libraries/AP_HAL_SITL/UARTDriver.h @@ -61,9 +61,9 @@ public: enum flow_control get_flow_control(void) { return FLOW_CONTROL_ENABLE; } - virtual bool set_speed(int speed); - virtual void configure_parity(uint8_t v); - virtual void set_stop_bits(int n); + virtual bool set_speed(int speed) { return true; } + virtual void configure_parity(uint8_t v) { } + virtual void set_stop_bits(int n) { } bool set_unbuffered_writes(bool on); void _timer_tick(void); diff --git a/libraries/AP_HAL_SITL/UART_utils.cpp b/libraries/AP_HAL_SITL/UART_utils.cpp index eaeef096f6..8e8025b5de 100644 --- a/libraries/AP_HAL_SITL/UART_utils.cpp +++ b/libraries/AP_HAL_SITL/UART_utils.cpp @@ -15,7 +15,7 @@ * with this program. If not, see . */ #include -#if CONFIG_HAL_BOARD == HAL_BOARD_SITL +#if CONFIG_HAL_BOARD == HAL_BOARD_SITL && !defined(__CYGWIN__) #include "UARTDriver.h"