Add runtime UV protection toggle and treat near-zero sense as external power.
Per-pod NVS enable (default off) via UART/ESP-NOW/dashboard, and skip UV latch when LiPo ADC reads ~0 mV so USB/external supply still boots. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,6 +35,13 @@ bool pod_settings_is_uv_latched(void);
|
||||
esp_err_t pod_settings_set_uv_latched(bool latched);
|
||||
esp_err_t pod_settings_clear_uv_latched(void);
|
||||
|
||||
/**
|
||||
* Runtime enable for software UV protection (NVS). Missing key → disabled.
|
||||
* Independent of POWERPOD_BATTERY_UV_ENABLE compile gate.
|
||||
*/
|
||||
bool pod_settings_is_uv_enabled(void);
|
||||
esp_err_t pod_settings_set_uv_enabled(bool enabled);
|
||||
|
||||
/** Logical slave ids: 1…POD_CLIENT_ID_MAX (0 reserved for local master). */
|
||||
#define POD_CLIENT_ID_MIN 1u
|
||||
#define POD_CLIENT_ID_MAX 255u
|
||||
|
||||
Reference in New Issue
Block a user