Skip to content

feat(cpn): only show multimodule options relevant to the protocol and radio - #7944

Open
pfeerick wants to merge 4 commits into
mainfrom
pfeerick/cpn-mpm-relevant-options
Open

pfeerick wants to merge 4 commits into
mainfrom
pfeerick/cpn-mpm-relevant-options

Conversation

@pfeerick

@pfeerick pfeerick commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Closes #1400

Summary of changes:

Companion now only shows multimodule options that apply to the selected protocol and radio, using the same offline rules as the radio. The protocol table has already been shared with the firmware (radio/src/MultiSubtypeDefs.h), so failsafe and disable-channel-map were already gated (the DSM failsafe case from the issue was fixed that way). This PR covers the rest. Companion can't read the module's live protocol list, so it follows the radio's static fallback.

Companion (setup_module.cpp, multiprotocols.{h,cpp})

  • Hide Bind on channel and Disable telemetry for the MPM receiver protocols (AFHDS2A_RX, FrSkyX_RX, Bayang_RX, DSM_RX), matching IS_RX_MULTI.
  • Only show Disable telemetry on FrSky radios (Boards::getManufacturer() reads the same hw_defs field that generates MANUFACTURER_FRSKY), following Remove MPM no telemetry GUI on non FrSky radio #3637. On other radios it is only shown while it is set, so it can be cleared.
  • Hide the subtype selector for protocols with no subtypes (NO_SUBTYPE), matching MULTIMODULE_HAS_SUBTYPE. Protocols with a single named subtype still show it, as on the radio.
  • Remove the old FrSky failsafe special case. It dates from when MULTI_FRSKY had D16 subtypes, and the protocol table already handles failsafe.
  • Fix the missing breaks that made the OLRS / BUGS / BUGS_MINI receiver-number limits fall through to 63.
  • Clear Bind on channel when switching to an MPM receiver protocol, as the radio already does on any protocol change, so a hidden flag can't be left set.

Radio (gui_common.h, 128x64 / 212x64 model_setup.cpp, colorlcd mpm_settings)

  • Remove MPM no telemetry GUI on non FrSky radio #3637 hid Disable telemetry on non-FrSky radios, but a stored disableTelemetry bit is still sent to the module, so a model coming from a FrSky radio kept telemetry off with no way to clear it. The option now shows on non-FrSky radios only while it is set: it can be cleared but not set again. FrSky radios are unchanged.
  • Colour radios now also hide Disable telemetry and Bind on channel for MPM receiver protocols, as the B&W UIs already did. OpenTX (Streamline multi interface opentx/opentx#7524) hid both for these protocols on every UI, and the colorlcd rewrite lost that. MPM does honour autobind for receiver protocols, but with WAIT_FOR_BIND (enabled by default) it keeps the receiver protocol from starting until a bind is requested, and its docs only describe binding them with the Bind button.
  • Colour radios now update the Range button when the MPM protocol changes. It was only set when the page was built, so it stayed visible after switching to a receiver protocol and stayed missing after switching away. The channel range row is also hidden for receiver protocols, as on B&W radios.

Testing (in edgetx-dev:pr-42):

  • tools/build-gh.sh firmware builds for tx16s, zorro, x10, x9dp2019 and t12max all pass.
  • gtests-radio passes for TX16S and X9D+, and gtests-companion passes.
  • After the Bind on channel change: tx16s firmware rebuilt with tools/build-gh.sh, and Companion rebuilt with gtests-companion passing (44 tests). tx16s rebuilt again after the Range button and channel range change.
  • Tested on TX16S and T15 with MPM v1.3.4.xx, and macOS Companion

🤖 Generated with Claude Code

@pfeerick pfeerick added this to the 3.0 milestone Oct 25, 2026
@pfeerick pfeerick added enhancement ✨ New feature or request companion (cpn) Related to the companion software bug 🪲 Something isn't working labels Oct 25, 2026
pfeerick and others added 4 commits October 25, 2026 21:19
#3637 hid the multimodule "Disable telemetry" option on non-FrSky radios,
but a stored disableTelemetry bit is still sent to the module. A model
created on a FrSky radio therefore kept telemetry disabled with no way to
clear it.

Show the option on non-FrSky radios only while it is set, so it can be
cleared but not enabled again. Also hide it for MPM receiver protocols on
colour radios, as the B&W UIs already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… radio

- hide bind on channel and disable telemetry for MPM receiver protocols
- only show disable telemetry on FrSky radios, or while it is set (#3637)
- hide the subtype selector for protocols without subtypes
- drop stale FrSky failsafe special case, use the protocol table only
- fix fall-through that ignored the OLRS/BUGS receiver number limits

Closes #1400

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…adios

The B&W UIs and Companion hide "Bind on channel" for the MPM receiver
protocols (AFHDS2A_RX, FrSky_RX, Bayang_RX, DSM_RX), as OpenTX did on
every UI when they were added. The colorlcd rewrite lost the check, so
colour radios still offered it.

These protocols are only meant to bind on a manual request. MPM honours
the flag, but with WAIT_FOR_BIND (on by default) it holds the receiver
protocol until a bind is requested.

Companion now also clears the flag when switching to a receiver
protocol, as the radio already resets it on any protocol change, so a
hidden flag can't be left set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Range button was only created when the module window was built, so
changing the MPM protocol didn't update it: it stayed visible after
switching to a receiver protocol, which isModuleRangeAvailable() rules
out, and stayed missing after switching away from one until the page
was reopened. It is now always created and shown or hidden in
updateSubType(), which runs on every protocol change.

The channel range row is also hidden for MPM receiver protocols, as the
B&W UIs do (MODULE_CHANNELS_ROWS), since no channels are sent to the
module with these protocols.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pfeerick
pfeerick force-pushed the pfeerick/cpn-mpm-relevant-options branch from 6c2435e to a45dec5 Compare October 25, 2026 11:19
@pfeerick
pfeerick marked this pull request as ready for review October 25, 2026 23:33

This branch has not been deployed

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

Labels

bug 🪲 Something isn't working companion (cpn) Related to the companion software enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show only relevant options for MPM in Companion

1 participant