Add reliable Android BLE ride recorder
This commit is contained in:
Vendored
+29
@@ -78,6 +78,35 @@ removed before production firmware was built and flashed.
|
||||
beyond the 10.24-second queue window, so sequences 1,024 through 4,021 were
|
||||
intentionally lost; the single 2,998-sample gap, matching queue-overflow total,
|
||||
demonstrates bounded buffer exhaustion rather than a suspended output task.
|
||||
- `ride_20260820_090607.trk` — SHA-256
|
||||
`c938934c0905748d2f8d8be61cff1ff446d8415b34850628654967398fd7d91f`.
|
||||
This is the Android recorder acceptance capture after increasing the firmware
|
||||
queue to 3,072 samples (30.72 seconds). Bluetooth was deliberately disabled
|
||||
from the phone for five seconds and then restored. The completed capture
|
||||
contains 2,578 consecutive packets and 19,984 consecutive samples, both
|
||||
starting at sequence zero, with zero CRC/header errors, packet/sample gaps,
|
||||
sensor failures, queue overflows, transport send failures, invalid ACKs,
|
||||
loop overruns, or trailing bytes. Firmware status records one disconnect and
|
||||
one replay. The Android recorder durably deduplicated that exact replay, as
|
||||
recorded in `ride_20260820_090607.session.json` (SHA-256
|
||||
`b16a8f0c213a14fd2760b6efba1c6288f3631e57a331c553893e281dce047888`),
|
||||
and closed the session with `complete=true` and no error.
|
||||
|
||||
All 19,983 sample intervals are contiguous. Of those, 8,745 differ from
|
||||
exactly 10 ms. Across all intervals, absolute deviation is 0 us median, 40 us
|
||||
p95, 240 us p99, and 1,630 us maximum; among only the off-grid intervals it is
|
||||
10 us median, 60 us p95, and 750 us p99. Cumulative error is -726 us over
|
||||
199.83 seconds. The capture also has six explicitly flagged ADXL345 overruns;
|
||||
timestamps are taken before both I2C reads and therefore understate delays
|
||||
caused by preemption between the timestamp and physical sensor access.
|
||||
|
||||
The post-rename phone smoke test for application ID
|
||||
`com.jsjdesigns.trikkerecorder` was verified live but not retained as a fixture.
|
||||
It closed cleanly with 366 consecutive frames and 2,832 consecutive samples,
|
||||
zero CRC/header errors, packet/sample gaps, drops, queue overflows, loop
|
||||
overruns, or trailing bytes. The package-only rename did not change the Android
|
||||
protocol or storage implementation, and the retained outage fixture above
|
||||
remains the authoritative end-to-end acceptance artifact.
|
||||
|
||||
`tests/test_trikke_protocol.py` verifies the hashes, parses the captures in
|
||||
fragmented chunks, and asserts these signatures so the hardware evidence remains
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"captureFile": "ride_20260820_090607.trk",
|
||||
"sessionTokenHex": "77f213814e3c41da",
|
||||
"complete": true,
|
||||
"startWallClockMs": 1787231167523,
|
||||
"startElapsedRealtimeNs": 2415494841543927,
|
||||
"endWallClockMs": 1787231378168,
|
||||
"endElapsedRealtimeNs": 2415705485735774,
|
||||
"firstFrame": {"packetSequence":0,"deviceBaseTimestampUs":7652604,"phoneElapsedRealtimeNs":2415505638698090,"phoneWallClockMs":1787231178321},
|
||||
"lastFrame": {"packetSequence":2577,"deviceBaseTimestampUs":207411553,"phoneElapsedRealtimeNs":2415705468358690,"phoneWallClockMs":1787231378150},
|
||||
"frames": 2578,
|
||||
"samples": 19984,
|
||||
"duplicateReplays": 1,
|
||||
"packetGaps": 0,
|
||||
"packetResets": 0,
|
||||
"sampleGaps": 0,
|
||||
"sampleResets": 0,
|
||||
"droppedSamples": 0,
|
||||
"loopOverruns": 0,
|
||||
"queueOverflows": 0,
|
||||
"transportDisconnects": 1,
|
||||
"transportReplays": 1,
|
||||
"error": null
|
||||
}
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user