Fixed a 1-byte offset jitter that produced garbage values when the device was set to "faster" (4096 Sa/s) mode. Root cause: 4096 = 0x1000, so the sample_rate bytes in the raw S3 frame are `10 10 00` (DLE-escaped). After DLE unstuffing → `10 00` (2 bytes vs 3 for 1024/2048), making frame C 1 byte shorter and shifting all subsequent field offsets by -1. Fix: locate the stable 10-byte anchor `01 2c 00 00 be 80 00 00 00 00` (max-record-limit constant + first two alarm-level floats) and read: sample_rate = uint16_BE at anchor - 2 record_time = float32_BE at anchor + 10 Offline-validated against all five logged hex dumps (1071 and 1070 byte cfg, record times 3/5/8 s, sample rates 1024 and 4096): all five: correct values with anchor approach.
31 KiB
31 KiB