Skip to content

fix(cpn): copy and paste gvar#7407

Open
elecpower wants to merge 1 commit into
mainfrom
elecpower/fix-7406-gvars-copy-paste
Open

fix(cpn): copy and paste gvar#7407
elecpower wants to merge 1 commit into
mainfrom
elecpower/fix-7406-gvars-copy-paste

Conversation

@elecpower
Copy link
Copy Markdown
Collaborator

@elecpower elecpower commented May 28, 2026

Fixes #7406

Summary by CodeRabbit

  • Bug Fixes
    • Fixed data serialization to properly save and restore configuration settings that were previously being lost during sessions.

Review Change Stack

@elecpower elecpower added this to the 3.0 milestone May 28, 2026
@elecpower elecpower added companion Related to the companion software bug/regression ↩️ A new version of EdgeTX broke something backport/2.12 To be backported to a 2.12 release also. labels May 28, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7dcdadf8-6a5d-451a-962a-4671571eea4c

📥 Commits

Reviewing files that changed from the base of the PR and between 00d7544 and a1cbae8.

📒 Files selected for processing (1)
  • companion/src/firmwares/gvardata.cpp

📝 Walkthrough

Walkthrough

The PR adds the popup field to QDataStream serialization for GVarData. Both operator<< and operator>> are updated to write and read data.popup between data.max and data.prec, fixing a bug where the popup checkbox state was lost during copy/paste operations.

Changes

GVarData Popup Field Serialization

Layer / File(s) Summary
Popup field serialization/deserialization
companion/src/firmwares/gvardata.cpp
Both operator<< and operator>> now include data.popup in the stream between data.max and data.prec, preserving the field during serialization round-trips and fixing the copy/paste bug.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description is minimal but provides the linked issue number (#7406), though missing a detailed summary of changes as specified in the template. Expand the description to include a summary of changes explaining how the QDataStream serialization fix preserves the Popup field.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the bug fix objective: preserving the Popup flag during copy-paste of global variables (gvar).
Linked Issues check ✅ Passed The code changes directly address issue #7406 by updating QDataStream serialization to include the popup field, ensuring copy-paste preserves the Popup checkbox state.
Out of Scope Changes check ✅ Passed All changes are confined to gvardata.cpp QDataStream operators and directly relate to the Popup serialization fix for issue #7406.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch elecpower/fix-7406-gvars-copy-paste

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.12 To be backported to a 2.12 release also. bug/regression ↩️ A new version of EdgeTX broke something companion Related to the companion software

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Companion Global Variables Copy/Paste

1 participant