From d4e28285407a7048cce2895b6a5611cc3862fa99 Mon Sep 17 00:00:00 2001 From: Buzz Date: Wed, 27 Oct 2021 18:06:41 +1000 Subject: [PATCH] AP_Logger: esp32 takes longer to init its SD card after boot. see libraries/AP_HAL_ESP32/README.md for more. Author: Charles Villard Author: Buzz --- libraries/AP_Logger/AP_Logger_File.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Logger/AP_Logger_File.cpp b/libraries/AP_Logger/AP_Logger_File.cpp index d39262dec4..cacd87b7d2 100644 --- a/libraries/AP_Logger/AP_Logger_File.cpp +++ b/libraries/AP_Logger/AP_Logger_File.cpp @@ -1012,8 +1012,11 @@ bool AP_Logger_File::io_thread_alive() const return true; } // if the io thread hasn't had a heartbeat in a while then it is - // considered dead. Five seconds is enough time for a sdcard remount. +#if CONFIG_HAL_BOARD == HAL_BOARD_ESP32 + uint32_t timeout_ms = 10000; +#else uint32_t timeout_ms = 5000; +#endif #if CONFIG_HAL_BOARD == HAL_BOARD_SITL && !defined(HAL_BUILD_AP_PERIPH) // the IO thread is working with hardware - writing to a physical // disk. Unfortunately these hardware devices do not obey our