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:
@@ -47,6 +47,8 @@ typedef struct {
|
||||
uint32_t lipo1_mv;
|
||||
uint32_t lipo2_mv;
|
||||
uint32_t battery_updated_at;
|
||||
/** Master cache: software UV protection enabled on slave (default false). */
|
||||
bool uv_protection_enabled;
|
||||
/** Master: last ESPNOW_ASSIGN_ID send time (rate-limit resends). */
|
||||
uint32_t last_assign_sent_at;
|
||||
} client_info_t;
|
||||
@@ -119,6 +121,11 @@ esp_err_t client_registry_get_tap_config(uint32_t client_id,
|
||||
bma456_tap_config_t *cfg_out);
|
||||
size_t client_registry_set_tap_config_all(const bma456_tap_config_t *cfg);
|
||||
|
||||
esp_err_t client_registry_set_uv_protection(uint32_t client_id, bool enabled);
|
||||
esp_err_t client_registry_get_uv_protection(uint32_t client_id,
|
||||
bool *enabled_out);
|
||||
size_t client_registry_set_uv_protection_all(bool enabled);
|
||||
|
||||
/** Store latest accel sample from a slave (matched by sender MAC). */
|
||||
esp_err_t client_registry_update_accel(const uint8_t mac[CLIENT_MAC_LEN],
|
||||
uint32_t slave_id, int16_t x, int16_t y,
|
||||
|
||||
Reference in New Issue
Block a user