From 7994c2f6e292db255d169bd83db665c454adaafb Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Fri, 31 Oct 2025 12:08:40 -0400 Subject: [PATCH] CMake,config.h: Add -DSTIMBUFF_FRAME_RETRY_DELAY_MS This determines how long a stimbuff should wait before retrying to produce a stimframe, if the previous stimframe is still being produced. --- CMakeLists.txt | 10 ++++++++++ include/config.h.in | 1 + 2 files changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fd527b..341c3ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,14 @@ if(NOT STIMBUFF_FRAME_PERIOD_MS GREATER 0) "STIMBUFF_FRAME_PERIOD_MS must be a positive integer > 0") endif() +# Stimulus buffer frame retry delay configuration +set(STIMBUFF_FRAME_RETRY_DELAY_MS 3 + CACHE STRING "Stimulus buffer frame retry delay (ms)") +if(NOT STIMBUFF_FRAME_RETRY_DELAY_MS GREATER 0) + message(FATAL_ERROR + "STIMBUFF_FRAME_RETRY_DELAY_MS must be a positive integer > 0") +endif() + # World thread configuration option(WORLD_USE_BODY_THREAD "Use body thread for world component instead of separate world thread" OFF) @@ -61,6 +69,8 @@ endif() set(CONFIG_DEBUG_QUTEX_DEADLOCK_TIMEOUT_MS ${DEBUG_QUTEX_DEADLOCK_TIMEOUT_MS}) # Set the stimulus buffer frame period variable for config.h set(CONFIG_STIMBUFF_FRAME_PERIOD_MS ${STIMBUFF_FRAME_PERIOD_MS}) +# Set the stimulus buffer frame retry delay variable for config.h +set(CONFIG_STIMBUFF_FRAME_RETRY_DELAY_MS ${STIMBUFF_FRAME_RETRY_DELAY_MS}) # Configure config.h configure_file( diff --git a/include/config.h.in b/include/config.h.in index f5d0899..8ab57c6 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -13,6 +13,7 @@ #define CONFIG_MRNTT_DEVMGR_REATTACHER_PERIOD_MS @MRNTT_DEVMGR_REATTACHER_PERIOD_MS@ /* Stimulus buffer frame period configuration */ #define CONFIG_STIMBUFF_FRAME_PERIOD_MS @CONFIG_STIMBUFF_FRAME_PERIOD_MS@ +#define CONFIG_STIMBUFF_FRAME_RETRY_DELAY_MS @CONFIG_STIMBUFF_FRAME_RETRY_DELAY_MS@ /* World thread configuration */ #cmakedefine CONFIG_WORLD_USE_BODY_THREAD