Repository navigation
Conversation
Flysky radios (PL18 family, NV14, EL18, NB4P, PA01, ST16) put trainer in and out on different 3.5mm jack contacts, and ship with a crossover lead to suit. With a mono lead, as used by most other radios, the ring is grounded, so whichever direction is on the ring stops working. Add a "Trainer lead" option in Radio Setup > Hardware on these boards: - Crossover (default): existing behaviour, in and out on their own contacts - Standard: in and out both on the tip, for mono or straight leads Boards opt in via "trainer_jack_crossover" in their hw_defs; boards whose output (rather than input) is on the tip also set "trainer_jack_tip_is_out" (ST16). The setting takes a spare bit in the COLORLCD radio settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TR_JACK_MODES was built from the TR_COUNTRY_CODES strings since EdgeTX#6502, so the Jack mode option (X-Lite S / X-Lite Pro) listed US/JP/EU rather than Ask/Audio/Trainer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Companion support for the radio "Trainer lead" setting (trainerTipOnly): read and write it in radio settings so saving from Companion no longer resets it, and show a Crossover / Standard choice on the Hardware page for boards with "trainer_jack_crossover" in their hw_defs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ST16 had trainer in on PE5 (jack ring) and out on PE6 (jack tip), the opposite of the PL18 family and PA01, so it couldn't pair with them over the Flysky crossover lead in either direction. The schematic names PE5 PPM_IN and PE6 PPM_OUT on the MCU sheet, but the jack sheet labels the PE6 path PPM_INPUT and the PE5 path PPM_OUTPUT. Each is only a 200R series resistor plus ESD clamps, so either pin can drive or capture. Following the jack sheet gives in on the tip and out on the ring, matching the other Flysky radios. With every crossover board now having input on the tip, tip-only mode just sends on the input pin, so trainer_jack_tip_is_out is no longer needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fork PR for CI firmware builds and bench testing. Not for upstream yet.
Trainer lead option
Some radios put trainer input and output on different 3.5mm jack contacts and ship with a crossover lead. On PL18U, EL18 and PA01, input is on the tip and output on the ring. ST16 was defined the other way round; this PR swaps its pins to match (see below). With a mono lead, as used by most other radios, the ring is grounded, so whichever direction is on the ring stops working. Pulling the plug partly out works around it.
This adds a Trainer lead option to Radio Setup → Hardware on boards that set
trainer_jack_crossoverin their hw_defs:Flagged boards: PL18, PL18EV, PL18U, NB4P, NV14, EL18, PA01 and ST16. On all of them input is on the tip, so Standard simply sends on the input pin as well. Of these, only PL18U, EL18, PA01 and ST16 have been tested so far, and only on firmware without this change. The others use the same pins as PL18U and EL18.
The setting takes a spare bit in the colour-screen radio settings, so the settings struct doesn't grow. It's added to the YAML for all colour targets but only used on flagged boards. Changing it restarts the trainer on the new contacts straight away.
Alternative to EdgeTX#6970, which moves PL18-family output to the tip unconditionally and would break pairing over the supplied crossover lead.
Companion
Companion reads and writes
trainerTipOnlyand shows the same Crossover / Standard choice on its Hardware page for flagged boards, so saving radio settings from Companion keeps the setting.ST16 pin swap
ST16 had trainer in on PE5 (ring) and out on PE6 (tip), so it couldn't pair with the other Flysky radios over the crossover lead. The schematic's MCU sheet names PE5
PPM_INand PE6PPM_OUT, but the jack sheet labels the PE6 pathPPM_INPUTand the PE5 pathPPM_OUTPUT. Each path is only a 200R resistor plus ESD clamps, so this follows the jack sheet: in on PE6 (tip), out on PE5 (ring). This is a behaviour change for ST16: on the default Crossover setting it now pairs with PL18U/EL18/PA01 over the supplied lead, and slave over a mono lead needs Standard.Also included
fix(bw):TR_JACK_MODESwas built from the country-code strings, so the Jack mode option on X-Lite S and X-Lite Pro showed US/JP/EU instead of Ask/Audio/Trainer.Test plan
Known gaps
🤖 Generated with Claude Code