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:
@@ -33,6 +33,8 @@ enum MessageType {
|
||||
ESPNOW_ECHO_PING = 30;
|
||||
/** Host → master: get/set ESP-IDF log level for tag "*" (global). */
|
||||
SET_LOG_LEVEL = 31;
|
||||
/** Host → master: get/set BMA456H multitap detection parameters. */
|
||||
TAP_CONFIG = 32;
|
||||
}
|
||||
|
||||
message UartMessage {
|
||||
@@ -71,6 +73,8 @@ message UartMessage {
|
||||
EspNowEchoPingResponse espnow_echo_ping_response = 36;
|
||||
SetLogLevelRequest set_log_level_request = 37;
|
||||
SetLogLevelResponse set_log_level_response = 38;
|
||||
TapConfigRequest tap_config_request = 39;
|
||||
TapConfigResponse tap_config_response = 40;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,6 +349,38 @@ message SetLogLevelResponse {
|
||||
uint32 level = 2;
|
||||
}
|
||||
|
||||
// write=false: read tap config; write=true: apply + persist on target node.
|
||||
// client_id 0 = local BMA456; >0 = slave id on master; all_clients = push to all slaves.
|
||||
message TapConfigRequest {
|
||||
bool write = 1;
|
||||
uint32 client_id = 2;
|
||||
bool all_clients = 3;
|
||||
uint32 tap_sens_thres = 4;
|
||||
uint32 max_gest_dur = 5;
|
||||
uint32 tap_shock_dur = 6;
|
||||
uint32 quite_time_after_gest = 7;
|
||||
uint32 wait_for_timeout = 8;
|
||||
uint32 axis_sel = 9;
|
||||
bool enable_single = 10;
|
||||
bool enable_double = 11;
|
||||
bool enable_triple = 12;
|
||||
}
|
||||
|
||||
message TapConfigResponse {
|
||||
uint32 client_id = 1;
|
||||
bool success = 2;
|
||||
uint32 slaves_updated = 3;
|
||||
uint32 tap_sens_thres = 4;
|
||||
uint32 max_gest_dur = 5;
|
||||
uint32 tap_shock_dur = 6;
|
||||
uint32 quite_time_after_gest = 7;
|
||||
uint32 wait_for_timeout = 8;
|
||||
uint32 axis_sel = 9;
|
||||
bool enable_single = 10;
|
||||
bool enable_double = 11;
|
||||
bool enable_triple = 12;
|
||||
}
|
||||
|
||||
// Host → device: begin UART OTA (erase inactive OTA slot; device replies OTA_STATUS).
|
||||
message OtaStartPayload {
|
||||
uint32 total_size = 1;
|
||||
|
||||
Reference in New Issue
Block a user