The need?
A user wanted a quite special function yesterday that really got me baffling for while for a solution. Here’s the wished functions:
- 2-position trainer switch
- Momentary rescue-switch
- Trainer switch would make student active
- Momentary press on rescue would also make teacher active
- Student would be active only after trainer-switch would be first reset and then activated again
I can see the need, in heli’s rescue is usually a momentary switch and giving student control right back is not always very wise. It’s better to give control only after teacher have full control and orientation etc are back to normal.
User was using a 5 second sequencer to give control back to student 5 seconds after rescue was used but this is somewhat sketchy with heli’s. Time to gain total control after rescue (drifting far away, bringing heli back etc) varies between situations. So he wanted a better, manual solution.
The issue?
The issue is that this requires a momentary to latching function. And that is not present in Jeti without Lua. Or is it…?
The solution (How-To)
So, here we go, Sb (2-position switch) is trainer-switch and Sd (Momentary switch) is rescue. Let’s create four Logical Switches.
L1 is simply “Rescue OFF AND Trainer ON”:
L2 is “L1 AND L3” (Don’t mind the fact that you have not done L3 yet!)
L3 is “Rescue ON OR L2”:
And the last one, L4 is “Trainer ON AND L3”, here you need to note that L3 is reversed.
The result is three logical switches for background function and the fourth is the one being used later on:
Using the function
Usage is simple, assign the L4 as trainer-switch:
And yes, you’re set!
How does it work?
No, it’s not magic, it’s logical, as the name of logical switches say. Let’s go through the usage:
We start in the situation where teacher is flying and no rescue is used:
Now the teacher gives control to student by setting the 2-position switch Sb to ON, logical switches L1 and L4 are active:
Now, if (and when…) student does something teacher activates rescue by setting the momentary rescue-switch ON. Since the conditions for L4 are no longer true it disabled the student condition:
After the momentary rescue-switch is released the trainer-switch is still in active position. L4 is however disabled:
In order to re-activate L4 the 2-position trainer-switch needs to be set to OFF and then ON again. Exactly what user wanted. So, we have achieved a working solution :)
Enjoy teaching and enjoy learning the fun hobby of RC-heli’s!