Switching multiple auxiliary functions with one RC channel?

Hello,

I would like to switch multiple auxiliary functions with one switch: 31 (Motor emergency stop) and 94 (VTX PIT mode) - at the same time.

Unfortunately, I didn’t find any option except transmitting that switch on a different channel a 2nd time.

Is that possible somehow, e.g. via a lua script? There I found get_pwm(), but no way to trigger functions.

Thanks
Sebastian

1 Like

@Sebb,

We haven’t yet merged the feature to allow Lua scripts to execute auxiliary switch options so this isn’t possible for now. It may be that we get this included in Copter-4.1.0 but I can’t promise that.

1 Like

Depending on your transmitter, you could make the switch operation affect two channels.

1 Like

Yes, that’s what I meant with “except transmitting that switch on a different channel a 2nd time”. I did that in the past, but I only have 16 channels and I’m using 15 already…

I would like to switch multiple auxiliary functions with one switch: 31 (Motor emergency stop) and 94 (VTX PIT mode) - at the same time.

Unfortunately, I didn¢t find any option except transmitting that switch on a different channel a 2nd time.

Sorry, no option for doing that. One channel, one auxillary option.

Is that possible somehow, e.g. via a lua script? There I found get_pwm(), but no way to trigger functions.

Yes, you can do that on master. Merge was quite recent.

Sebastian

Peter

@peterbarker, are you sure it’s been merged? I think this is the PR that needs merging to allow Lua scripts to trigger auxiliary switch functions.

Hello,

I just looked into that, one minor question (before even having tried it yet):

I understand it can only set low/high/toggle (?) as parameter? If I could set a pulsewidth as input, it could also e.g. set the transmit power for Smart Audio, based on e.g. RSSI level in future…(?)

Sebastian

@Sebb,

That might be possible. The trouble I see though is that scripts can’t currently directly read the pwm input. Script can’ read a “button’s” state (e.g. on or off) and a button can be setup to switch on or off based on the pwm value… but scripts can’t read the underlying pwm value going into the “button”.