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:
@@ -26,6 +26,7 @@ enum EspNowMessageType {
|
||||
ESPNOW_TAP_EVENT = 18;
|
||||
ESPNOW_ECHO_PING = 19;
|
||||
ESPNOW_ECHO_PONG = 20;
|
||||
ESPNOW_SET_TAP_CONFIG = 21;
|
||||
}
|
||||
|
||||
message EspNowUnicastTest {
|
||||
@@ -103,6 +104,20 @@ message EspNowTapNotify {
|
||||
bool triple = 4;
|
||||
}
|
||||
|
||||
/** Master → slave: BMA456H multitap detection parameters. */
|
||||
message EspNowTapConfig {
|
||||
uint32 client_id = 1; // 0 = all slaves; otherwise only matching slave_id applies
|
||||
uint32 tap_sens_thres = 2;
|
||||
uint32 max_gest_dur = 3;
|
||||
uint32 tap_shock_dur = 4;
|
||||
uint32 quite_time_after_gest = 5;
|
||||
uint32 wait_for_timeout = 6;
|
||||
uint32 axis_sel = 7;
|
||||
bool enable_single = 8;
|
||||
bool enable_double = 9;
|
||||
bool enable_triple = 10;
|
||||
}
|
||||
|
||||
/** Slave → master: tap detected on BMA456 (event, not periodic). */
|
||||
message EspNowTapEvent {
|
||||
uint32 slave_id = 1;
|
||||
@@ -177,5 +192,6 @@ message EspNowMessage {
|
||||
EspNowTapEvent tap_event = 19;
|
||||
EspNowEchoPing echo_ping = 20;
|
||||
EspNowEchoPong echo_pong = 21;
|
||||
EspNowTapConfig tap_config = 22;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user