Repository navigation
Conversation
Add a model-level USB mode (Global / Ask / Joystick / Storage / Serial), modelled on the ADC filter option. Global, the default for new models, uses the radio setting; any other value takes priority when USB is plugged in. The mode is resolved at plug-in, so switching models while connected keeps the current session. - Model setup: new USB mode row after the ADC filter (colorlcd "Other" section, B&W model setup) - Radio setup shows when the current model overrides the USB mode, and radio hardware does the same for the ADC filter: "Model - X" next to the control on colorlcd, a separate "MODEL - X" line on B&W - Lua: usbMode in model.getInfo()/setInfo() - Companion: model setting, YAML read/write and model setup combo - Translations: shared TR_GLOBAL for the "Global" choice entries (fixing untranslated nl/ko leftovers), STR_MODEL_USBMODES built from existing strings, shorter Danish USB mode label and Swedish storage mode for B&W Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Closes #589. Adds a per-model USB mode that overrides the radio setting, modelled on the ADC jitter filter option.
What it does
Changes
ModelData::usbMode:3(ModelUsbModeenum, 0 = Global, otherwise radiousbMode + 1). YAML structures were regenerated for all targets. The colorlcdModelDataCHKSIZE grows by 1 byte; B&W is unchanged.getModelUsbMode()inmain.cppreplaces the directg_eeGeneral.USBModeread inhandleUsbConnection().Model - Xnext to the control, as for the view options.MODEL - Xline under the setting, right-aligned, shown only while overridden (same mechanism as the "Overridden by SF/GF" lines). An inline hint doesn't fit every translation on B&W; this line fits all B&W languages with room to spare.model.getInfo()/model.setInfo()exposeusbMode. Out-of-range values set Global.STR_MODEL_USBMODES, built from the existing USB mode strings plus a new sharedTR_GLOBAL. No new words for translators.TR_GLOBALwhere they were identical.Testing
🤖 Generated with Claude Code