RC switch state on OSD

Hi,

What could be the easiest way to show the RC switch state on the OSD (and not do anything else with this switch, just to show)?
To display a variable in OSD that changes depending on the switch state.
(In Betaflight, we used the “RC Channels” element for this.)

What is the end goal?

See XY Problem.

We have another hardware that will see this info. To see 2 numbers changing after the switch clicks is the end goal.

Why not use PWM, GPIO, MAVLink, serial or any other hardware 2 hardware option. All trivially implementable using Lua or natively supported.

Because this is a small part of a bigger integration that already works. It fully works on other systems (Beta, Inav) and partially on Ardupilot (everything without this small part).

Of course, if I need to connect some hardware to ArduPilot, and don’t need OSD, I’ll prefer MAVLink. But, to build one more link for ArduPilot only, when other systems already work without it, will be strange.

  1. All available OSD values are listed Here
  2. You can try abusing ESC telemetry Lua API
  3. If it’s stupid and it works, it’s still stupid and you’re lucky.
  4. Since Ardupilot supports proper telemetry there never was need to send PWM values or alike over video because we have orders of magnitude more efficient methods to do so.
  5. PS all of previously mentioned methods can be used with other flight stack except instead of using Lua you would modify code if applicable.
2 Likes