Skip to content

Fix sample range and ordering during data compression#31

Open
philippitts wants to merge 1 commit intomasterfrom
fix-compression-range-and-ordering
Open

Fix sample range and ordering during data compression#31
philippitts wants to merge 1 commit intomasterfrom
fix-compression-range-and-ordering

Conversation

@philippitts
Copy link
Member

In v3 of the firmware, it is no longer necessary to send an uncompressed packet every 200 samples. This means that we send Packet IDs of [0:99] for 18-bit compression and Packet IDs of [100:199] for 19-bit compression. In v2 of the firmware, we sent Packet ID [0] for the uncompressed packet followed by Packet IDs of [1:100] for 18-bit compression and [101:200] for 19-bit compression.

Currently, the firmware sends on even samples. This means that the first packets with IDs [0] and [100] are malformed. They only have the second part of the packet. The sample counter also resets every 201 samples when it should reset every 200 samples. This means that Packet ID 100 will be correct when 18-bit compression is used, but malformed when 19-bit compression is used.

This merge request corrects the sample counter loop and sends data on odd samples.

@philippitts philippitts self-assigned this Jan 22, 2026
@philippitts philippitts requested a review from retiutut January 22, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant