How to create a "sticky" throttle hold.
- mwm
- Topic Author
- Offline
Model setup
This has been updated to use Fabian's nifty single virtual channel version with domcars0 fix for 3d flight modes.
Doing this currently requires the advanced mixer settings. Plane or heli doesn't matter, but you do need the advanced mixer setting. The source setting in mixer 2 is the throttle output channel (ch3 here).
Mixer
Virtual channel (Virt1 for me) = Complex Mix - 3 pages
- Page 1:
- Switch = None
- Src = this virtual channel (Virt1 for me)
- Curve = Min/Max
- Scale = 100
- Offset = 0
- Mux = replace
- Page 2:
- Switch = None
- Src = CH3
- Curve = 1-to-1
- Scale = 100
- Offset = -1
- Mux = add
- Page 3:
- Switch = the switch who enable the throttle cut (RUD DR0 for me)
- Src = none
- Curve = Fixed
- Scale = 100
- Offset = 0
- Mux = replace
Depending on your calibration, you may need to tweak the offset a litle. To check this, use your virtual channel as the source for an output channel with a 1-1 curve, then use a channel monitor to verify that it's less than or equal to zero unless the throttle stick is all the way down, in which case it's one.
Throttle output mix
You now need to apply the new sticky throttle hold switch to your throttle. If you're not sure how to configure a throttle hold, see +sbstnp's writeup . Where he has selected !HOLD0 for the safety switch, you should select your virtual channel - so for me, Virt1. Note that his selection starts with a !, whereas this one does not!
Testing
Without binding an aircraft to the controller, go to the channel output monitor, and find your throttle output. Set the throttle stick to somewhere in the middle, and then throw your throttle hold switch. The throttle output should go to -110. Now throw the throttle hold switch the other way, and verify that the throttle output stays at -110. Finally, pull the throttle stick all the way down, after which throttle output should start tracking normally.
The attached th-example.ini file implements this as described. It also sets Toggle 1 to display a Th emblem whenever the throttle is being held, and finally adds a countdown timer that pauses when there is no throttle output.
Fabian's example config can be found here .
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- richardclli
- Offline
- Posts: 199
Please Log in or Create an account to join the conversation.
- myxiplx
- Offline
- Posts: 54
Amazing work, still trying to get my head around the logic!
Please Log in or Create an account to join the conversation.
- victzh
- Offline
- Posts: 1386
This is a very nice gem, I'm thinking of making a collection of such tricks. Another one is automatic timer start-stop when throttle is active.
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
victzh wrote: Could you attach the example model file for those who better edit files than operates settings?
Never occurred to me that anyone might want such. I've added it to the first post.
victzh wrote: This is a very nice gem, I'm thinking of making a collection of such tricks. Another one is automatic timer start-stop when throttle is active.
That's in the example as well - for timer 1.
This also sets up Toggle 1 on the main screen to display a Th symbol whenever the throttle is being held.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- richardclli
- Offline
- Posts: 199
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
richardclli wrote: Add some screen shots about the settings.
Thanks richard. I've got a 7E and a 10, and figured that text would be better than greyscale screenshots of those. Color works nicely for illustrations, but I'm not sold on color touchscreens for a Tx yet.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
The fix is to change the first virtual mix. Set up and test the initial post. Then, in your first virtual mix (Virt1 in the example):
Change the type from simple to complex.
Set it to two mixers.
The scale will have been reset to 0. Change it back to -49.
Set up the second page:
Curve type is fixed.
Scale is -100.
Switch is the same one you use for inverted flight modes.
If you use FMODE0 for normal and all other flight modes for inverted, set the switch to !FMODE0. If you use FMODE0 and FMODE1 for normal flight and FMODE2 for inverted, set the switch to FMODE2.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- domcars0
- Offline
- Posts: 390
Anyway, thanks for this great idea mwm.
Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers
Please Log in or Create an account to join the conversation.
- fabien
- Offline
Virtual channel (Virt1 for me) = Complex Mix - 3 pages
- Page 1:
- Switch = None
- Src = this virtual channel (Virt1 for me)
- Curve = Min/Max
- Scale = 100
- Offset = 0
- Mux = replace
- Page 2:
- Switch = None
- Src = THR
- Curve = 1-to-1
- Scale = 100
- Offset = -1
- Mux = add
- Page 3:
- Switch = the switch who enable the throttle cut (RUD DR0 for me)
- Src = none
- Curve = Fixed
- Scale = 100
- Offset = 0
- Mux = replace
Please Log in or Create an account to join the conversation.
- domcars0
- Offline
- Posts: 390
Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers
Please Log in or Create an account to join the conversation.
- gordonzo
- Offline
- Posts: 43
That is a very slick little subroutine! Simple and effective.
I added it to the Hisky FBL 70 and 80 configurations on my Devo 10 and it works great! A few things to note for the more nooby-ish like myself:
1. On page 3 you can't change the SRC until you change CURVE to FIXED, and then it automatically sets SRC to NONE.
2. Don't forget to change your THR SAFETY to the VIRT channel you used or it will not work.
Again, superb! I will be adding this to all of my configs.
regards . . . g
Different fly for different guy.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Please Log in or Create an account to join the conversation.
- Drexz
- Offline
- Posts: 10
Renamed mine to Sticky_TH and it would work fine until i rebooted my Devo12s.
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
domcars0 wrote: I think that if you use Inverted Flight mode it's enough to replace THR by CH3 (or CH1 depending on which channel is used for the throttle) as SRC in the first (here Virt1) mixer? No ?
That should actually work both with and without inverted flight modes, as it's the actual output that you're worried about. It should also work with +Fabien's trick of adding the channel in.
I do worry that checking the output instead of the stick position might cause it to trigger when you don't want to if you're mixing the throttle position in strange ways on the way to being output, but I suspect that it's not worth worrying about until it happens.
Be interesting to see if these show up in templates in the next release.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- Rollmops67
- Offline
- Posts: 40
I just set Fabien's settings in my heli.domcars0 wrote: I think that if you use Inverted Flight mode it's enough to replace THR by CH3 (or CH1 depending on which channel is used for the throttle) as SRC in the first (here Virt1) mixer? No ?
Anyway, thanks for this great idea mwm.
In fact with THR as source, the Virtual Throttle Hold was reset when the throttle stick went to -100, even in FMOD1 and FMOD2, where at these positions of the stick the motor runs with negative pitch.
I tried domcars0's advice and replace THR as source with CH3 wich is indeed my throttle output.
And voilĂ , now to go out of the throttle hold I have to put the throttle stick at -100 AND having the FMOD switch in position 0.
That's the only point on my 3 throttle curves where my throttle output is at -100 (rotor stopped)
Fantastic !
Thank you all !
Roland
Please Log in or Create an account to join the conversation.
- esklarski
- Offline
- Posts: 14
fabien wrote: I managed to do the same as you but with only one virtual channel, so I decide to post my version here rather than opening a new topic.
Virtual channel (Virt1 for me) = Complex Mix - 3 pagesNow you can use the virtual channel as safety switch for THR. You can find an example of use in the model config I share for the Blade Nano QX here .
- Page 1:
- Switch = None
- Src = this virtual channel (Virt1 for me)
- Curve = Min/Max
- Scale = 100
- Offset = 0
- Mux = replace
- Page 2:
- Switch = None
- Src = THR
- Curve = 1-to-1
- Scale = 100
- Offset = -1
- Mux = add
- Page 3:
- Switch = the switch who enable the throttle cut (RUD DR0 for me)
- Src = none
- Curve = Fixed
- Scale = 100
- Offset = 0
- Mux = replace
I don't mean to drag up an old topic but I'm trying to learn from this example. I programed this in last night and think it is super slick.
Trouble is I don't understand how this works... at all. Anyone able to put this in english for a newbie?
Please Log in or Create an account to join the conversation.
- mwm
- Topic Author
- Offline
Ok, Page 1 is the real magic. That's what makes it "sticky". It takes the previous output value of this virtual channel, and does a Min/Max process on it, meaning the output of this page is 100 if the input was non-negative, and -100 if it was negative.
Page two takes clever advantage of the fact that an analog value treated as a switch is ON if the value is non-negative, and OFF otherwise. It uses the Mux setting of add to add the value of the throttle setting (or output, as noted later) - a curve of 1-1 and scale of 100 is unmodified - with an offset of -1 to the output of page 1. So if Page 1 output -100, the value is at most -1, still off. If Page 1 output 100, then the value goes from -1 to 199. If the throttle is all the way down, you get -1 and the switch for this virtual channel is off. Any other throttle setting makes the output value 0 or greater, and the switch is on. This is how the virtual switch gets turned off.
Page 3 is a stock switch-controlled mixer. If the physical switch in the switch setting is on, the fixed output of 100 is used, turning on the switch for this virtual channel. If the physical switch is off, then the output of Page 2 is used unchanged. This is how the virtual switch gets turned on.
That explains how the switch gets it's value. You then use this virtual channel as the switch value for "Safety" in the throttle channel. That causes the software to set the throttle output to 0 if the switch is on.
If something isn't clear, feel free to ask.
Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.
My remotely piloted vehicle ("drone") is a yacht.
Please Log in or Create an account to join the conversation.
- esklarski
- Offline
- Posts: 14
I puzzeled over your post today and I understand now. Thank you thank you.
For others out there learning, here is the short-hand I ended up with as I worked the math.
Page1 (on/off switch)
-Min/Max : 100(ON) if output >=0, or -100(OFF) if <0
Page2 (turn OFF)
-Mux: add THR to Virt1
offset= -1 (range: -101 to 99)
so:
- If Page1=100 then 100%THR [199] to -99%THR [0]-> ON
- If THR=-100 then Page1=-1 -> OFF
Page3 (switch-controlled turn ON)
- If switch=ON output=100 -> Page1 ON
- If switch=OFF, Virt1=Page1+Page2
Please Log in or Create an account to join the conversation.
- hexfet
- Offline
- Posts: 1891
Instead of using CH3 as the src in page 2 I set the switch to FMODE0 (I read the thread bottom up). This also keeps the hold in effect until both throttle stick is at -100 and FMOD switch is at 0.
Please Log in or Create an account to join the conversation.