Control two relays with one three states channel/switch

Hi,
Is there a solution to control two auxoutputs with three state switch?
Like this:

Relay_1/Relay_2: On/Off On/On Off/On

Sure - that’s a function of the transmitter to handle the mixer and logical switches to operate the two RC channels in the required combination. Each relay/GPIO output is assigned to an RC channel of it’s own.
I know it’s easy enough on any OpenTX or EdgeTX transmitter. I’m not familiar with mixing on some other radios. I did some mixing on old cheap radios, but that was a couple of hundred years ago now
It used to be common to set up 6 flight modes from a 3 position switch and a 2 position switch - so it’s a similar theory to that.

.

Know transmiter mixing but here I’m looking for something like in-firmware mixing. But yes, I will go with transmiter mixes if there is no other solution.

LUA scripting.

Here’s some examples that you could base things off

Never used LUA scripts… Looks interesting.

Do note the flight controller requirements to run the LUA script.