Add runtime BMA456 tap config with NVS persistence and goTool UI.

Expose multitap parameters over UART/ESP-NOW (like deadzone), store per node in NVS, and allow get/set from CLI, REST, and the dashboard without poll-overwrite while editing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
simon
2026-09-26 13:07:13 +02:00
co-authored by Cursor
parent f006f8b912
commit d7441cb85f
32 changed files with 1859 additions and 150 deletions
+13
View File
@@ -1,6 +1,7 @@
#ifndef POD_SETTINGS_H
#define POD_SETTINGS_H
#include "bosch456.h"
#include "esp_err.h"
#include <stdbool.h>
#include <stdint.h>
@@ -17,6 +18,18 @@ uint32_t pod_settings_load_accel_deadzone(void);
/** Apply NVS deadzone to BMA456 when the sensor is present. */
void pod_settings_apply_accel_deadzone(void);
/** Persist local BMA456 tap detection config. */
esp_err_t pod_settings_save_tap_config(const bma456_tap_config_t *cfg);
/**
* Load tap config from NVS into *cfg_out.
* Returns true when a valid blob was loaded; false → compile-time defaults.
*/
bool pod_settings_load_tap_config(bma456_tap_config_t *cfg_out);
/** Apply NVS tap config to BMA456 when the sensor is present. */
void pod_settings_apply_tap_config(void);
/** LiPo under-voltage latch persisted across reboot (software UV protection). */
bool pod_settings_is_uv_latched(void);
esp_err_t pod_settings_set_uv_latched(bool latched);