Bench: a flag to suppress the TFT render task

MESHTASTIC_BENCH_NO_TFT_TASK initializes the panel as usual but never starts
the render loop, so a board whose panel shares the radio's SPI bus can be run
with and without display bus traffic from otherwise identical firmware.

Bench only; undefined it preprocesses away to today's code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5ccEnKA2TfgCLVHmaZ4Fh
This commit is contained in:
Jonathan BennettandClaude Opus 5 committed 2026-10-14 01:34:43 +00:00
1 parent 03168c53a6
commit 02bae4ffbb
1 file changed
+7
+7
View File
@@ -429,7 +429,14 @@ void tftSetup(void)
}
tftSleepObserver->observe(&notifyLightSleep);
endSleepObserver->observe(&notifyLightSleepEnd);
#ifdef MESHTASTIC_BENCH_NO_TFT_TASK
// Bench only: the panel is initialized above, so the bus comes up exactly as it does in a
// normal boot, but no render loop runs afterwards. On a board whose panel shares the radio's
// SPI bus that isolates the display's bus traffic as a single variable.
LOG_WARN("BENCH: TFT render task suppressed, no display SPI traffic");
#else
xTaskCreatePinnedToCore(tft_task_handler, "tft", TFT_TASK_STACK_SIZE, NULL, 1, NULL, 0);
#endif
#elif defined(ARCH_PORTDUINO)
std::thread *tft_task = new std::thread([] { tft_task_handler(); });
#endif