build fix

This commit is contained in:
liquidraver
2026-08-05 14:44:11 +02:00
parent d1093bfc5e
commit 68ed34d157
2 changed files with 14 additions and 1 deletions
+7
View File
@@ -766,6 +766,7 @@ config ZEPHCORE_REPEATER_GPS_INTERVAL_SEC
config ZEPHCORE_GPS_NMEA_DUMP
bool "Log every NMEA sentence received from the GNSS module"
depends on GNSS
help
Print each sentence the GNSS driver parses, plus everything else the
module emits, to the console. For diagnosing a receiver that reports
@@ -799,6 +800,12 @@ config ZEPHCORE_GPS_NAV_MODE
config ZEPHCORE_GPS_SAT_DIAG
bool "GPS per-constellation satellite diagnostics"
# Must depend on GNSS, not just select GNSS_SATELLITES: on a board with
# no GNSS at all (native Linux, xiao_nrf52840) GNSS is n, and y-selecting
# a symbol whose dependencies are unmet is a Kconfig error that aborts the
# build — not a warning. The repeater default below would otherwise turn
# this on for every GNSS-less repeater target.
depends on GNSS
select GNSS_SATELLITES
default y if ZEPHCORE_ROLE_REPEATER
help
+7 -1
View File
@@ -29,6 +29,7 @@
#include <zephyr/drivers/i2c.h>
#include <zephyr/pm/device.h>
#include <string.h>
#include <stdio.h>
#if defined(CONFIG_SOC_NRF52840)
#include <nrfx.h>
#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).