CMake,config.h: Add -DSTIMBUFF_FRAME_PERIOD_MS

This determines the maximum rate at which stimbuffs will be refreshed
with data from their device.
A device may refresh less frequently than this, but not more
frequently. The goal here is to give us control over the max
rate at which a device produces data.
This commit is contained in:
2025-10-31 11:31:04 -04:00
parent 5c3bc6c324
commit 720babd39d
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -32,6 +32,14 @@ if(NOT MRNTT_DEVMGR_REATTACHER_PERIOD_MS GREATER 0)
"MRNTT_DEVMGR_REATTACHER_PERIOD_MS must be a positive integer > 0")
endif()
# Stimulus buffer frame period configuration
set(STIMBUFF_FRAME_PERIOD_MS 33
CACHE STRING "Stimulus buffer frame period (ms)")
if(NOT STIMBUFF_FRAME_PERIOD_MS GREATER 0)
message(FATAL_ERROR
"STIMBUFF_FRAME_PERIOD_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)
@@ -51,6 +59,8 @@ endif()
# Set the timeout variable for config.h
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})
# Configure config.h
configure_file(
+2
View File
@@ -11,6 +11,8 @@
/* Device manager reattacher configuration */
#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@
/* World thread configuration */
#cmakedefine CONFIG_WORLD_USE_BODY_THREAD