Harden BLE host link and expose latency tools in the dashboard.

Add BLE RTT/stream tests and live tick median in the UI, fix concurrent WebSocket writes and late BATTERY replies, and skip 2M PHY updates that assert under ESP-NOW coexistence.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-23 23:27:39 +02:00
co-authored by Cursor
parent aa67edfe94
commit af20635047
14 changed files with 893 additions and 293 deletions
+9 -1
View File
@@ -57,6 +57,14 @@ func tapEventsFromCacheStatus(r *pb.CacheStatusResponse) []*pb.TapEvent {
// cacheStatusFromBLEStreamPayload parses a framed BLE_STREAM_TICK payload
// (type byte + protobuf UartMessage) into a CacheStatusResponse-shaped view.
func cacheStatusFromBLEStreamPayload(payload []byte) (*pb.CacheStatusResponse, error) {
tick, err := parseBleStreamTickPayload(payload)
if err != nil {
return nil, err
}
return &pb.CacheStatusResponse{Clients: tick.GetClients()}, nil
}
func parseBleStreamTickPayload(payload []byte) (*pb.BleStreamTick, error) {
if len(payload) < 2 {
return nil, fmt.Errorf("BLE stream tick too short")
}
@@ -71,5 +79,5 @@ func cacheStatusFromBLEStreamPayload(payload []byte) (*pb.CacheStatusResponse, e
if tick == nil {
return nil, fmt.Errorf("missing ble_stream_tick")
}
return &pb.CacheStatusResponse{Clients: tick.GetClients()}, nil
return tick, nil
}