Fun, Learning, Friendship and Mutual Respect START  HERE


Unregistered
Go Back   HeliFreak > R/C Electronics Support > OpenTX Radios


OpenTX Radios OpenTX Radios Discussion and Support Forum


Reply
 
LinkBack Thread Tools Display Modes
Old 02-27-2017, 07:25 AM   #1 (permalink)
Registered Users
 
Posts: 1,573
 

Join Date: Dec 2012
Default OpenTX programming help thread

Thought this might be a good idea as more and more people are migrating to OpenTX. While I picked it up much quicker than I thought I would, there are still some areas I've yet to master. Im sure im not alone. (at least I hope not!)

The one I cant figure out right now is how to set up the timer the way I want.
I would like a timer that is activated by throttle (25% out perhaps) but continues counting down even if the throttle stick dips below the threshold. Currently my timer pauses when the stick goes below the threshold. So any inverted affects the timers accuracy.
__________________
Whiplash Gasser l Goblin Gasser
in2deep is offline        Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 02-27-2017, 08:13 AM   #2 (permalink)
Registered Users
 
Posts: 1,636
 

Join Date: Jul 2012
Location: Central Utah, USA
Default Change the THROTTLE SOURCE for the timer

Quote:
Originally Posted by in2deep View Post
... The one I cant figure out right now is how to set up the timer the way I want.
I would like a timer that is activated by throttle (25% out perhaps) but continues counting down even if the throttle stick dips below the threshold. Currently my timer pauses when the stick goes below the threshold. So any inverted affects the timers accuracy.
The timer THs (and TH%) selections default to use the throttle stick - you need to change this to the throttle channel output. On MODEL SETUP page 2, scroll down to the Throttle Source setting and change it from the default xThr (where the "x" indicates the throttle stick), to: CH1 (or whatever channel your throttle is on).

You can achieve the same functionality using a logical switch but I find the above method is the simplest and cleanest. Note that this method activates the timer whenever the throttle channel output is greater that zero (actually > -100% which works very well). If for some reason you want to set a higher threshold, you'll need to go the the more complicated logical switch route. Also, I recommend using the timer THs option instead of TH% (the TH% option employs a variable countdown rate in proportion to the throttle output and this is not terribly useful for CP helis).

Hope this helps!
ridge-runner is offline        Reply With Quote Quick reply to this message
Old 02-27-2017, 01:03 PM   #3 (permalink)
Registered Users
 
My HF Map location
Join Date: Jun 2009
Default

THs will stop timer when throt is at 0.
And TH% counts slower the lower throt is.
You want THt which starts when throt leaves 0 but keeps counting if throt returns to 0.
u8mydog is offline        Reply With Quote Quick reply to this message
Old 02-27-2017, 04:12 PM   #4 (permalink)
Registered Users
 
Posts: 3,455
 

Join Date: Jan 2014
Default

I set a logic switch that looks at my throttle channel output. Then, you set timer 1 or 2 to run off the logic switch. In my case, it is L1.
__________________
Oxy 2, Gaui X3 #1, Protos 380, Gaui X5, Synergy 766, Specter 700
Oxy 2/X3/Protos 380/X5/766/Specter 700 Consecutive Successful Flights (Current) = 32/16/12/145/7/50
Consecutive Successful Flights (Max) = 145
macdad is offline        Reply With Quote Quick reply to this message
Old 02-28-2017, 08:26 PM   #5 (permalink)
Registered Users
 
Posts: 1,636
 

Join Date: Jul 2012
Location: Central Utah, USA
Default

Quote:
Originally Posted by macdad View Post
I set a logic switch that looks at my throttle channel output. Then, you set timer 1 or 2 to run off the logic switch. In my case, it is L1.
You can do the same thing without using a logic switch - see my post above.
ridge-runner is offline        Reply With Quote Quick reply to this message
Old 03-10-2017, 08:16 PM   #6 (permalink)
Registered Users
 
Posts: 4,563
 

Join Date: Mar 2013
Default

That's easy I think. Don't think of Throttle as "throttle stick", think of it as channel value.

Make a logical switch that says it's on if channel value (throttle) goes above -50% (Taranis uses -100, 0 middle, to +100)

So then you pick this switch it will no longer pause the timer for going inverted (unless you're in normal. ) it will still pause on throttle hold as the throttle channel will go below 25 or -50.

Let me know if that works for you.

Ridge runners is the simplest. Same thing just skips making a logical switch.
gunny_jeeves is offline        Reply With Quote Quick reply to this message
Old 03-11-2017, 02:48 AM   #7 (permalink)
Registered Users
 
Posts: 1,482
 

Join Date: Dec 2016
Default

Glad to hear more people are making the switch! Now maybe these FBL manufacturers will provide some FrSky integration for telemetry and such!

I use ridge runners method but instead of it using the throttle stick to start the timer I have it start when I disengage the throttle hold!
jtroutt19 is offline        Reply With Quote Quick reply to this message
Old 03-11-2017, 04:04 PM   #8 (permalink)
Registered Users
 
Posts: 1,636
 

Join Date: Jul 2012
Location: Central Utah, USA
Default 3-way Throttle Hold Switch!

Quote:
Originally Posted by jtroutt19 View Post
... I use ridge runners method but instead of it using the throttle stick to start the timer I have it start when I disengage the throttle hold!
With regard to the throttle channel (CH-THR), my Taranis setup is rather sophisticated (and dare I say: safe!)? In addition to the traditional NORMAL RUN mode (where the throttle channel ramps down to idle as the CP/THR stick is moved down), I have a 3-way throttle hold switch (TH) that works together with two other 3-way switches (GOVERNOR triple rates and CP/FM triple rates) to control the throttle channel output as follows:
  1. "ENGINE OFF": (CH-THR = -100% = all the way off) Placing the switch to this position forces the model into a safe: "ENGINE OFF" state. This "ENGINE OFF" state is always active when the Tx is first powered on (and whenever this model slot is selected/activated), regardless of this switch's initial position. This "safe" state is controlled by a STICKY logical switch that is always OFF until the user explicitly and deliberately performs the: SECRET THROTTLE ENABLE HANDSHAKE. (Having this default "ENGINE OFF" state dramatically reduces the chance of accidentally/inadvertently turning on power to the motor). To exit the "ENGINE OFF" state and enable throttle output, the TH 3-way switch must first be placed in the "THROTTLE HOLD" position (or in the RUN position with NORMAL mode selected). Secondly, the left stick must be moved to the secret position (typically the extreme lower left corner). (Note that this secret handshake logic can be made as simple or as complex as desired - I chose to make mine fairly simple involving only one stick.) Care must be taken during flight to not activate this switch position unless you really mean it! Note also that this logic state is also used to turn the Tx data logging on and off.
  2. "THROTTLE HOLD": (CH1 = -95%) This is the "engine idling" position. For an IC engine, this would be the throttle position where the engine has a nice idle (that said, I don't have any IC craft - all mine are electric). For electric models, this "THROTTLE HOLD" position represents the engine off (but not quite ALL the way off), and this is used for autorotation bail outs. All the ESC governors I've dealt with allow enabling this ESC fast start/bailout mode where power is removed, but slow start is avoided. During flight, flipping the TH switch from RUN to THROTTLE HOLD will kill power to the heli allowing autorotation - and flipping it back to RUN results in a fast start.
  3. "RUN": (-95% > CH-THR >= +100%) In this position the throttle channel output is allowed to go above idle (-95%). While in RUN mode, the headspeed is controlled using a GOVERNOR switch having three positions: HIGH, MEDIUM and LOW. These three positions chose from one of three flat throttle curves. RUN mode is further subdivided into three traditional flight modes, chosen with the FLIGHT MODE switch. (These three flight modes primarily affect collective pitch):
    • FLIGHT MODE 2: (CH-CP = +/-100%) This is the balls to the wall "idle up 2" mode with full +/-100% collective pitch travel range. Any one of the three available headspeeds can be selected using the 3-way GOVERNOR switch. In this mode, the throttle channel remains on at all times throughout the CP stick range.
    • FLIGHT MODE 1: (CH-CP = +/-80%) This is a reduced "idle up 1" mode where the collective pitch travel range is reduced to +/-80%. Like FM2, any one of the three available headspeeds can be selected using the 3-way GOVERNOR switch and the throttle channel remains on at all times throughout the CP stick range.
    • NORMAL MODE: (-40% >= CH-CP >= 80%, -95% >= CH-THR >= 100%) This is the traditional "NORMAL" mode, where the throttle channel output ramps down to zero as the CP/THR stick is moved to the bottom (although this ramp down is optional - its controlled via curve #1). However, this throttle ramp down effect is only active for the bottom half of the stick range - the upper half of the range has a flat throttle curve identical to FLIGHT MODEs 1 and 2. Like the other two RUN modes, any one of the three available headspeeds can be selected using the 3-way GOVERNOR switch - the only difference here is that the throttle is ramped down to zero in the lower half of the stick range. The NORMAL RUN mode also has a reduced lower range for the collective pitch as well, and this is to improve the CP sensitivity in the negative realm used during autorotations. I typically set this reduced negative CP range to be -40%, which corresponds to about -6 degrees angle - (this is a number cited by Curtis Youngblood in his video discussing autorotations).
As I said - this is a pretty sophisticated setup (that requires quite a bit of practice in the sim to get used to). Note also that I use a sprung throttle stick so that it always wants to return to zero pitch. In my model setups, all of the numbers mentioned above (e.g. the 80% and -40% reduced CP range numbers, the -95% THR idle setting and the three governed headspeeds), are all set using global variables, and are easily adjusted on one screen. Expo and triple rates for the cyclic are also specified using global vars. Also, the ramp down of the throttle is specified using one curve - (and this can be made flat for those who do not like the throttle to ramp down in normal mode).

Oh yeah, and the timer only runs when the throttle channel output is above idle (as mentioned in my previous post).

Just sayin'!

Last edited by ridge-runner; 03-11-2017 at 04:32 PM..
ridge-runner is offline        Reply With Quote Quick reply to this message
Old 03-21-2017, 07:18 PM   #9 (permalink)
Registered Users
 
Posts: 1,482
 

Join Date: Dec 2016
Default

Thats awesome man. Would you be willing to send me your model and config file for the open tx companion so I can look at all of it!
__________________
Assault 700 IKON 2
jtroutt19 is offline        Reply With Quote Quick reply to this message
Old 03-21-2017, 10:27 PM   #10 (permalink)
Registered Users
 
Posts: 1,636
 

Join Date: Jul 2012
Location: Central Utah, USA
Default My advanced REALFLIGHT model

Quote:
Originally Posted by jtroutt19 View Post
Thats awesome man. Would you be willing to send me your model and config file for the open tx companion so I can look at all of it!
Sure, but be careful what you ask for!

DISCLAIMER - DO NOT USE ON REAL MODEL!
The attached model described below is useful for a sim only - it is NOT meant to be used on a real model. If used on a real model, accidently flipping the SA mode switch would very likely result in a crash. This model is presented only to serve as an example demonstrating some useful techniques that can be implemented using OpenTX.

A REALFLIGHT SIMULATOR MODEL
Attached is a PDF and an eepe file (OTX 2.1) for my REALFLIGHT 7.5 model. This complex (but powerful) 12-channel model implements a simplified version of the 3-way TH switch (on SG) described above. The "ENGINE OFF" state is controlled with logical switches 9 and 10 (but note that for the simulator this is actually a simplified version where throttle is enabled when SG is in either RUN or TH position and the throttle stick is fully down).

I am not going to describe this model in complete detail, but will provide a few general notes:

There are 7 flight modes FM1-FM7 (and note that FM0 is never used).
  1. ENGINE OFF - Default startup mode where throttle channel output is forced to -100. Controlled by switch G, the throttle stick, and logical switches 9 and 10. To exit this mode the throttle stick must be fully down and switch G not in forward position (!SGv).
  2. THROTTLE HOLD - (SG-) This is the throttle idle state where the value is set with the right pot (S2).
  3. CALIBRATE - (SAv) This mode is handy for calibrating the simulator. All 12 channels are forced to -100, zero, and +100 via switch C (SC).
  4. PLANK MODE - (SA-) This is plank mode where SB controls flaps, SC controls brakes, RS controls smoke and SE controls landing gear. The throttle channel output at the center of the stick (which is sprung) is controlled using the left pot (S1). As the pot is moved, the throttle curve varies as shown in the following animated GIF:

    Note also that the leftmost idle position is controlled with the right pot (S2) - but this variation is not shown in this graphic.
  5. CP HELI NORMAL MODE - (SE^) The throttle is ramped down (according to curve 1) to zero in the bottom 25% of the throttle stick range and the top 75% is flat and controlled via the governor switch C. The collective pitch upper half range is reduced to 80% (GV6) and the lower half is reduced to 40% (half of the upper = 50% = GV7).
  6. CP HELI IDLE UP 1 - (SE-) Throttle is flat controlled by SC and collective pitch range is reduced to 80% (GV6).
  7. CP HELI IDLE UP 2 - (SEv) Throttle is flat controlled by SC and collective pitch range is 100%.

Misc notes:
  • The mixer for the throttle (channel 3) is quite complex because it handles the idle and center controls in plank mode and also the throttle hold and engine off flight modes (which override both plank and heli modes).
  • For all flight modes (other than calibration mode), switch D controls triple rates for aileron and elevator.
  • Curve 2 provides a dead band which I use for the rudder channel. Also, there is no expo or dual rates for the rudder.
  • A quick flick of the momentary switch F (I swapped F and H on my X9D), plays out the timer 1 value.
  • A long flick of the momentary switch F (from 0.4 to 1.5 seconds), resets timer 1.
  • The first 4 logical switches, timer 2 and first 4 special functions are for my (as yet unreleased) TaraniJuke music player.
  • There are voice callouts for most flight mode changes.
Attached Files
File Type: eepe X9D_OTX2.1_REALFLIGHT_JMR_20170321_2000.eepe (77.0 KB, 61 views)
File Type: pdf X9D_OTX2.1_REALFLIGHT_JMR_20170321_2000.pdf (36.3 KB, 96 views)

Last edited by ridge-runner; 03-22-2017 at 08:38 AM..
ridge-runner is offline        Reply With Quote Quick reply to this message
Old 03-22-2017, 07:35 AM   #11 (permalink)
 

Join Date: Jan 2016
Default

i'm assuming this is an exercise in opentx and not a program that you actually use to fly anything except the sim. even then, it is advisable to setup the simulator the same as your actual model with respect to the control locations and functions so I can't really see using this for anything except explaining opentx.

also, if you switch to calibrate mode while flying you will crash. that's another reason I suspect this is not to be used for actual flying.

Quote:
Originally Posted by ridge-runner View Post
Sure, but be careful what you ask for!

Attached is a PDF and an eepe file (OTX 2.1) for my REALFLIGHT 7.5 model. This complex (but powerful) 12-channel model implements a simplified version of the 3-way TH switch (on SG) described above. The "ENGINE OFF" state is controlled with logical switches 9 and 10 (but note that for the simulator this is actually a simplified version where throttle is enabled when SG is in either RUN or TH position and the throttle stick is fully down).

I am not going to describe this model in complete detail, but will provide a few general notes:

There are 7 flight modes FM1-FM7 (and note that FM0 is never used).
  1. ENGINE OFF - Default startup mode where throttle channel output is forced to -100. Controlled by switch G, the throttle stick, and logical switches 9 and 10. To exit this mode the throttle stick must be fully down and switch G not in forward position (!SGv).
  2. THROTTLE HOLD - (SG-) This is the throttle idle state where the value is set with the right pot (S2).
  3. CALIBRATE - (SAv) This mode is handy for calibrating the simulator. All 12 channels are forced to -100, zero, and +100 via switch C (SC).
  4. PLANK MODE - (SA-) This is plank mode where SB controls flaps, SC controls brakes, RS controls smoke and SE controls landing gear. The throttle channel output at the center of the stick (which is sprung) is controlled using the left pot (S1). As the pot is moved, the throttle curve varies as shown in the following animated GIF:

    Note also that the leftmost idle position is controlled with the right pot (S2) - but this variation is not shown in this graphic.
  5. CP HELI NORMAL MODE - (SE^) The throttle is ramped down (according to curve 1) to zero in the bottom 25% of the throttle stick range and the top 75% is flat and controlled via the governor switch C. The collective pitch upper half range is reduced to 80% (GV6) and the lower half is reduced to 40% (half of the upper = 50% = GV7).
  6. CP HELI IDLE UP 1 - (SE-) Throttle is flat controlled by SC and collective pitch range is reduced to 80% (GV6).
  7. CP HELI IDLE UP 2 - (SEv) Throttle is flat controlled by SC and collective pitch range is 100%.

Misc notes:
  • The mixer for the throttle (channel 3) is quite complex because it handles the idle and center controls in plank mode and also the throttle hold and engine off flight modes (which override both plank and heli modes).
  • For all flight modes (other than calibration mode), switch D controls triple rates for aileron and elevator.
  • Curve 2 provides a dead band which I use for the rudder channel. Also, there is no expo or dual rates for the rudder.
  • A quick flick of the momentary switch F (I swapped F and H on my X9D), plays out the timer 1 value.
  • A long flick of the momentary switch F (from 0.4 to 1.5 seconds), resets timer 1.
  • The first 4 logical switches, timer 2 and first 4 special functions are for my (as yet unreleased) TaraniJuke music player.
  • There are voice callouts for most flight mode changes.
Raleighcopter is offline        Reply With Quote Quick reply to this message
Old 03-22-2017, 08:30 AM   #12 (permalink)
Registered Users
 
Posts: 1,636
 

Join Date: Jul 2012
Location: Central Utah, USA
Default

Quote:
Originally Posted by Raleighcopter View Post
i'm assuming this is an exercise in opentx and not a program that you actually use to fly anything except the sim. even then, it is advisable to setup the simulator the same as your actual model with respect to the control locations and functions so I can't really see using this for anything except explaining opentx.

also, if you switch to calibrate mode while flying you will crash. that's another reason I suspect this is not to be used for actual flying.
Yes, this is meant to show how to implement several useful features and is targeted for a sim only. Not meant to be used with a real model.

Very good point - I'll add a disclaimer to the post.
Thanks for the heads up.

Last edited by ridge-runner; 03-22-2017 at 08:40 AM..
ridge-runner is offline        Reply With Quote Quick reply to this message
Old 03-22-2017, 03:02 PM   #13 (permalink)
Registered Users
 

Join Date: Oct 2014
Default

Quote:
Originally Posted by u8mydog View Post
THs will stop timer when throt is at 0.
And TH% counts slower the lower throt is.
You want THt which starts when throt leaves 0 but keeps counting if throt returns to 0.
No, I want THs. Why would I want my flight timer to keep counting after the flight is over?
jarhart is offline        Reply With Quote Quick reply to this message
Old 03-22-2017, 10:55 PM   #14 (permalink)
Registered Users
 
My HF Map location
Join Date: Jun 2009
Default

Quote:
Originally Posted by jarhart View Post
No, I want THs. Why would I want my flight timer to keep counting after the flight is over?
That response was targeted towards the original question in this thread.

Personally, I usually use THs for electrics. If I enter throttle hold, the timer stops. Practicing autos the timer will stop during the decent.

But for nitros, you may want the timer to continue until you shutdown no matter what throttle setting you have.

Also, if you have a very small quad with FPV gear that draws a decent amount of current, you may want the timer to continue even if you are not applying throttle to the model
u8mydog is offline        Reply With Quote Quick reply to this message
Old 03-22-2017, 11:22 PM   #15 (permalink)
Registered Users
 
Posts: 1,482
 

Join Date: Dec 2016
Default

Awesome man thank you I will take a look and ask questions if any pop up!
__________________
Assault 700 IKON 2
jtroutt19 is offline        Reply With Quote Quick reply to this message
Old 08-30-2017, 07:45 PM   #16 (permalink)
Registered Users
 
Posts: 1,573
Thread Starter Thread Starter
 

Join Date: Dec 2012
Default Circling back...

So I finally dug into the logical switch/special functions in OpenTx last night. All I can say is wow. I've been flying for the last few months happily with the Horus, but with just the most basic of functions. Now that Ive wrapped my head around the logical switches and everything that comes along with it, Im like a kid in a candy store.

My question for today: How do I edit the sound files the Horus uses on power up and shut down? Where are they stored?


Yes, I know I started this thread a while ago, but kids, wife, career, etc...

Thanks all.
__________________
Whiplash Gasser l Goblin Gasser
in2deep is offline        Reply With Quote Quick reply to this message
Old 08-30-2017, 08:30 PM   #17 (permalink)
Registered Users
 
Posts: 1,636
 

Join Date: Jul 2012
Location: Central Utah, USA
Default

Quote:
Originally Posted by in2deep View Post
... How do I edit the sound files the Horus uses on power up and shut down? Where are they stored? ...
Any sound editing application - e.g. Audacity.
The sound file needs to be MONOPHONIC (1 channel only), 32kHz PCM Wave file format. (16 kHz works as well but is not as hi-fidelity.)

The startup wave file is: SOUNDS/en/hello.wav
Not sure what the shutdown sound is.
ridge-runner is offline        Reply With Quote Quick reply to this message
Old 08-31-2017, 08:09 AM   #18 (permalink)
Registered Users
 
Posts: 1,573
Thread Starter Thread Starter
 

Join Date: Dec 2012
Default

Quote:
Originally Posted by ridge-runner View Post
Any sound editing application - e.g. Audacity.
The sound file needs to be MONOPHONIC (1 channel only), 32kHz PCM Wave file format. (16 kHz works as well but is not as hi-fidelity.)

The startup wave file is: SOUNDS/en/hello.wav
Not sure what the shutdown sound is.
Great, thanks for the quick reply
__________________
Whiplash Gasser l Goblin Gasser
in2deep is offline        Reply With Quote Quick reply to this message
Old 08-31-2017, 08:27 AM   #19 (permalink)
Registered Users
 
Posts: 1,573
Thread Starter Thread Starter
 

Join Date: Dec 2012
Default

Is there a limit to how many sound files OpenTX will index?

I seem to remember that I couldn't just copy the whole Amber pack over to the SD card, that I had to be selective.
__________________
Whiplash Gasser l Goblin Gasser
in2deep is offline        Reply With Quote Quick reply to this message
Old 08-31-2017, 08:31 AM   #20 (permalink)
Registered Users
 
Posts: 3,676
 

Join Date: Mar 2012
Location: Wauwatosa, WI
Default

I never had an issue. Did you have enough space on your card?
__________________
Specter v2, Tron Dnamic, Nimbus 550, P380, Edge-TX
JWeber is offline        Reply With Quote Quick reply to this message
Reply




Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the HeliFreak forums, you must first register.
Please enter your desired user name, your REAL and WORKING email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself. Use a real email address or you will not be granted access to the site. Thank you.
Email Address:
Location
Where do you live? ie: Country, State, City or General Geographic Location please.
Name and Lastname
Enter name and last name here. (This information is not shown to the general public. Optional)
Helicopter #1
Enter Helicopter #1 type and equipment.
Helicopter #2
Enter Helicopter #2 type and equipment.
Helicopter #3
Enter Helicopter #3 type and equipment.
Helicopter #4
Enter Helicopter #4 type and equipment.

Log-in


Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Copyright © Website Acquisitions Inc. All rights reserved.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.

SEO by vBSEO 3.6.1