Fix variable_bit_size command corruption and add UI support#2777
Merged
Fix variable_bit_size command corruption and add UI support#2777
Conversation
- Use deep_copy instead of clone when building commands to prevent shared item modifications from affecting the template packet - Fix Python truthiness bug in structure.py where original_array_size=0 was incorrectly treated as falsy (use `is None` check instead) - Add disabled state to LENGTH fields in Command Sender UI since they are auto-managed by variable_bit_size mechanism - Add VARIABLE_ARRAYS command/telemetry handling to sim_inst.rb - Add unit tests for structure to catch the array size truthiness bug - Add Playwright E2E test for VARIABLE_ARRAYS command Co-Authored-By: Claude Opus 4.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2777 +/- ##
==========================================
+ Coverage 78.70% 78.73% +0.02%
==========================================
Files 671 671
Lines 54796 54823 +27
Branches 731 731
==========================================
+ Hits 43128 43164 +36
+ Misses 11588 11579 -9
Partials 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jmthomas
commented
Feb 3, 2026
| if item.variable_bit_size: | ||
| minimum_data_bits = 0 | ||
| if (item.data_type == "INT" or item.data_type == "UINT") and not item.original_array_size: | ||
| if (item.data_type == "INT" or item.data_type == "UINT") and item.original_array_size is None: |
Member
Author
There was a problem hiding this comment.
Another not bug where item.original_array_size could be 0
Contributor
There was a problem hiding this comment.
Fun with dynamic languages!
if not item.original_array_size: - Evaluates to True for:
- None
- 0 (zero)
- Any other "falsy" value (empty string, empty list, False, etc.)
if item.original_array_size is None: - Evaluates to True ONLY for:
- None
mcosgriff
reviewed
Feb 3, 2026
|
jmthomas
added a commit
that referenced
this pull request
Mar 21, 2026
Fix variable_bit_size command corruption and add UI support
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.




is Nonecheck instead)closes #2749