From c0b388d89f6472c683ffe0713a77c39c94971ba9 Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Wed, 5 Aug 2026 14:13:29 +0200 Subject: [PATCH] build fix --- zephcore/adapters/gps/ZephyrGPSManager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zephcore/adapters/gps/ZephyrGPSManager.cpp b/zephcore/adapters/gps/ZephyrGPSManager.cpp index 6c49fcf..33dd3d9 100644 --- a/zephcore/adapters/gps/ZephyrGPSManager.cpp +++ b/zephcore/adapters/gps/ZephyrGPSManager.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #if defined(CONFIG_SOC_NRF52840) #include #endif @@ -82,6 +83,12 @@ LOG_MODULE_REGISTER(zephcore_gps, CONFIG_ZEPHCORE_GPS_LOG_LEVEL); #define HAS_GPS_POWER_REGULATOR 0 #endif +/* Runtime diagnostics toggle. Declared OUT here, not inside the HAS_GNSS + * block: gps_set_diag()/gps_get_diag()/gps_get_diag_report() are part of the + * unconditional public API and are compiled on boards with no GNSS at all, + * so a declaration hidden behind HAS_GNSS breaks every such board. */ +static bool gps_diag_on = false; + /* ========== GPS Power Strategy ========== * Module power is GPIO/regulator controlled — GNSS driver PM is not used * for the module itself: @@ -482,7 +489,6 @@ static struct { int64_t at_ms; /* uptime when configuration last ran */ } gps_cfg_diag; -static bool gps_diag_on = false; /* Module identification string, captured by the GNSS driver from the reply to * its version query (CASIC parts answer in-band as a $GPTXT sentence).