From b0f04c6b33160b6f6f9fd10da9d1c4ae7337ec76 Mon Sep 17 00:00:00 2001 From: R0ck Date: Fri, 16 Oct 2026 00:04:22 +0100 Subject: [PATCH] host: HostBoard answers attachDynamicPrefs, which MeshCore 1.18 calls MeshCore 1.18.0 has every role call board.attachDynamicPrefs() in begin(), and gives its own nRF52, ESP32 and STM32 boards a no-op for it. HostBoard had none, so MyMesh.cpp stopped compiling, build.sh dropped it as a board-specific source, and every role failed to link on every platform with MyMesh's own methods undefined. KeyValueStore is forward-declared rather than included because the header only exists from 1.18 on. --- variants/host/HostBoard.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/variants/host/HostBoard.h b/variants/host/HostBoard.h index fdc1739..e8240f5 100644 --- a/variants/host/HostBoard.h +++ b/variants/host/HostBoard.h @@ -9,6 +9,10 @@ #include #include +// Declared rather than included: KeyValueStore.h exists only from MeshCore +// 1.18 on, and this header has to keep building the versions before it. +class KeyValueStore; + class HostBoard : public mesh::MainBoard { public: void begin() {} @@ -32,6 +36,11 @@ class HostBoard : public mesh::MainBoard { // No thermal sensor. -128 is outside anything a working MCU reports, so a // reader sees an absent value rather than a cold day. float getMCUTemperature() { return -128.0f; } + + // Every role hands the board its custom prefs at startup so a variant can + // read its own settings from them. A host has no board-specific settings, + // which is also what MeshCore's own nRF52, ESP32 and STM32 boards answer. + void attachDynamicPrefs(KeyValueStore*) {} }; // HostRTCClock is wall time, which is what a repeater's RTC provides once it