Add CACHE_STATUS UART poll and dashboard live stream.

Combine cached accel and tap in one low-overhead master command for ~16 ms
host polling. The dashboard uses a single live-stream toggle plus per-slave
accel-stream controls; fix live_stream state so polling is not cleared every
slow client refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-29 20:57:54 +02:00
co-authored by Cursor
parent a8d4d42920
commit f512936d97
21 changed files with 764 additions and 377 deletions
+14
View File
@@ -27,6 +27,8 @@ enum MessageType {
BATTERY_STATUS = 26;
TAP_NOTIFY = 27;
TAP_SNAPSHOT = 28;
/** Combined cached accel + tap poll (one UART round-trip, ~16 ms cadence). */
CACHE_STATUS = 29;
}
message UartMessage {
@@ -63,6 +65,8 @@ message UartMessage {
TapNotifyResponse tap_notify_response = 30;
TapSnapshotRequest tap_snapshot_request = 31;
TapSnapshotResponse tap_snapshot_response = 32;
CacheStatusRequest cache_status_request = 33;
CacheStatusResponse cache_status_response = 34;
}
}
@@ -232,6 +236,16 @@ message TapSnapshotResponse {
repeated TapEvent events = 1 [(nanopb).max_count = 16];
}
/** Host → master: one-shot read of subscribed cached slave data (no request body). */
message CacheStatusRequest {}
message CacheStatusResponse {
/** Slaves with accel_stream_enabled. */
repeated AccelSample accel = 1 [(nanopb).max_count = 16];
/** Slaves with any tap notify flag; pending taps are consumed (like TAP_SNAPSHOT). */
repeated TapEvent taps = 2 [(nanopb).max_count = 16];
}
message EspNowUnicastTestRequest {
uint32 client_id = 1;
uint32 seq = 2;