From a216e1d239b31eb2a5892e0a06df440cba3d51e7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Oct 2013 11:10:06 +1100 Subject: [PATCH] HAL_Linux: don't prevent write while timer is busy the timer can block on I2C writes, which causes the main loop to run --- libraries/AP_HAL_Linux/UARTDriver.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libraries/AP_HAL_Linux/UARTDriver.cpp b/libraries/AP_HAL_Linux/UARTDriver.cpp index 4677047e55..21091987de 100644 --- a/libraries/AP_HAL_Linux/UARTDriver.cpp +++ b/libraries/AP_HAL_Linux/UARTDriver.cpp @@ -258,10 +258,6 @@ size_t LinuxUARTDriver::write(uint8_t c) if (!_initialised) { return 0; } - if (hal.scheduler->in_timerprocess()) { - // not allowed from timers - return 0; - } uint16_t _head; while (BUF_SPACE(_writebuf) == 0) { @@ -283,11 +279,6 @@ size_t LinuxUARTDriver::write(const uint8_t *buffer, size_t size) if (!_initialised) { return 0; } - if (hal.scheduler->in_timerprocess()) { - // not allowed from timers - return 0; - } - if (!_nonblocking_writes) { /* use the per-byte delay loop in write() above for blocking writes