mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-23 01:41:29 +00:00
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:
1 parent
e6d6ecef80
commit
d5bd805710
59 files changed
+3090
-3077
No files matched your search
@@ -216,17 +216,6 @@ void ui_set_battery_provider(uint16_t (*provider)(void));
|
||||
*/
|
||||
void ui_refresh_battery(void);
|
||||
|
||||
/**
|
||||
* Prepare the device for sys_poweroff(): stop heartbeat LED, blank the
|
||||
* display, power off GPS + sensor regulators, hold LoRa in HW reset,
|
||||
* configure SENSE on sw0 (nRF only) for button wakeup.
|
||||
*
|
||||
* Caller is responsible for any shutdown chime BEFORE this call and the
|
||||
* final sys_poweroff() AFTER. Both UI variants share this so the System
|
||||
* OFF state is consistent regardless of which UI design is compiled in.
|
||||
*/
|
||||
void ui_prepare_for_system_off(void);
|
||||
|
||||
/**
|
||||
* Register a power-source provider used by ui_auto_shutdown_check().
|
||||
* provider() must return true when the device is externally powered
|
||||
@@ -271,7 +260,7 @@ void ui_set_shutdown_hook(ui_shutdown_fn fn);
|
||||
* CONFIG_ZEPHCORE_AUTO_SHUTDOWN_MILLIVOLTS is 0 this is a no-op. Otherwise,
|
||||
* if the battery is below the threshold AND not externally powered, it shows
|
||||
* a brief warning (3 s on OLED, instant-persist on e-paper) and powers off
|
||||
* via ui_prepare_for_system_off() + sys_poweroff().
|
||||
* via zephcore_power_off().
|
||||
*/
|
||||
void ui_auto_shutdown_check(void);
|
||||
|
||||
|
||||
Reference in new issue
Block a user