From d60b4842b66f482de1983f1dec2f41390b0e29ec Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 5 Oct 2016 12:58:49 -0300 Subject: [PATCH] AP_HAL_Linux: reduce scope of dummy buffer --- libraries/AP_HAL_Linux/SPIUARTDriver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_Linux/SPIUARTDriver.cpp b/libraries/AP_HAL_Linux/SPIUARTDriver.cpp index 310cc64d52..d5d4b84961 100644 --- a/libraries/AP_HAL_Linux/SPIUARTDriver.cpp +++ b/libraries/AP_HAL_Linux/SPIUARTDriver.cpp @@ -111,10 +111,10 @@ int SPIUARTDriver::_write_fd(const uint8_t *buf, uint16_t size) return ret; } -static uint8_t ff_stub[300] = {0xff}; - int SPIUARTDriver::_read_fd(uint8_t *buf, uint16_t n) { + static uint8_t ff_stub[100] = {0xff}; + if (_external) { return UARTDriver::_read_fd(buf, n); }