Add BMA456 tap detection with ESP-NOW notify and host snapshot API.

Slaves forward configured tap kinds to the master; goTool exposes CLI, dashboard, REST, and WebSocket with separate notify vs receive and 2s display cache.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 20:42:57 +02:00
co-authored by Cursor
parent 3cb0b5bbe9
commit a8d4d42920
34 changed files with 3138 additions and 241 deletions
+19
View File
@@ -22,6 +22,8 @@ enum EspNowMessageType {
ESPNOW_LED_RING = 14;
ESPNOW_BATTERY_QUERY = 15;
ESPNOW_BATTERY_REPORT = 16;
ESPNOW_SET_TAP_NOTIFY = 17;
ESPNOW_TAP_EVENT = 18;
}
message EspNowUnicastTest {
@@ -76,6 +78,21 @@ message EspNowBatteryQuery {
uint32 client_id = 1;
}
/** Master → slave: which tap kinds should be reported via ESP-NOW. */
message EspNowTapNotify {
uint32 client_id = 1;
bool single = 2;
bool double_tap = 3;
bool triple = 4;
}
/** Slave → master: tap detected on BMA456 (event, not periodic). */
message EspNowTapEvent {
uint32 slave_id = 1;
/** 1=single, 2=double, 3=triple */
uint32 kind = 2;
}
/** Slave → master: LiPo voltages (periodic ~30 s and on query). */
message EspNowBatteryReport {
uint32 client_id = 1;
@@ -139,5 +156,7 @@ message EspNowMessage {
EspNowLedRing led_ring = 15;
EspNowBatteryQuery battery_query = 16;
EspNowBatteryReport battery_report = 17;
EspNowTapNotify tap_notify = 18;
EspNowTapEvent tap_event = 19;
}
}