Fix sample range and ordering during data compression#31
Open
philippitts wants to merge 1 commit intomasterfrom
Open
Fix sample range and ordering during data compression#31philippitts wants to merge 1 commit intomasterfrom
philippitts wants to merge 1 commit intomasterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.