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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user