peripherals & power: GPS fixes, poweroff/pwrmgt, upstream SensorManager telemetry

- gps: servers honour gps_enabled at boot (was lost on reboot; zc.gps_set
  upgrades older prefs to on once); sleep lock only while acquiring;
  gps off works on boards without a power line (UART sleep); UI toggles
  and fixes handled on the main thread; configure only after a good init;
  observer parks its GPS; one interval clamp (clampGpsInterval); one
  nav-mode knob (room servers on Air530Z now stationary); GNSS UARTE from DT
- gps: split into ZephyrGPSManager / gps_power / gps_module_cfg
  (+gps_internal.h); dead driver branches, gps_get_diag, sats_* removed
- clock: ZephyrRTCClock writes the hardware RTC itself (clkreboot now
  resets it); MESH_EVENT_RTC_SAVE gone
- power: one power-off path (zephcore_power_off, ZephyrBoard::powerOff),
  poweroff/shutdown CLI, get pwrmgt.*, crash record kept across reboot,
  battery reading cached 10 s, fuel gauge on the current API
- telemetry: upstream SensorManager + CayenneLPP (rounded to nearest),
  one builder for all roles; per-sensor channels, MCU temp always,
  guest gating and inverse mask on servers; sensor list/get/set work;
  BME280/BMP280 also probed at 0x77
- CLI: gps in upstream's form, get gps detail, gps sync
This commit is contained in:
liquidraver
2026-09-25 17:56:34 +02:00
parent e6d6ecef80
commit d5bd805710
59 changed files with 3090 additions and 3077 deletions
+7 -17
View File
@@ -55,18 +55,12 @@
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <string.h>
#ifdef CONFIG_POWEROFF
#include <zephyr/sys/poweroff.h>
#endif
#if defined(CONFIG_SOC_FAMILY_NORDIC_NRF)
#include <hal/nrf_gpio.h>
#endif
#include <zephyr_poweroff.h>
#include <zephyr/sys/reboot.h>
/* GPS control (extern "C" in ZephyrSensorManager.h) */
#include <ZephyrSensorManager.h>
/* GPS control */
#include <ZephyrGPSManager.h>
/* Mesh action wrappers (deferred to mesh event loop thread) */
#include "ui_mesh_actions.h"
@@ -535,14 +529,10 @@ static void action_deep_sleep(void)
}
#endif
/* Shared peripheral teardown + SENSE config for sw0 wake.
* Single source of truth in helpers/ui/ui_common.c so the joystick
* UI variant ends up in the same low-power state. */
ui_prepare_for_system_off();
LOG_INF("deep sleep: entering System OFF");
sys_poweroff();
CODE_UNREACHABLE;
/* The one power-off path (adapters/board/zephyr_poweroff.c), shared
* with the joystick UI and the CLI. */
zephcore_shutdown_reason_save(ZC_SHUTDOWN_USER);
zephcore_power_off();
#else
LOG_WRN("deep sleep: CONFIG_POWEROFF not enabled");
#endif