Let your Taranis know when you arm your quad!
I, like many others, own a FrSky Taranis and I simply love it, I like how you can program any little detail and today I decided a regular timer wasn't enough, I simply wanted the Taranis to know when my quad is armed and when it is disarmed in order to log telemetry data only when the copter is in use and also to start the timer only when the motors are spinning. Before this I used to log data as soon as the radio was on and the timer was set to be proportional to the Throttle stick position.
Let's take a look at how I programmed the radio to know when I arm the copter.
Here is a screenshot of the custon switches tab:
I fly in mode 1 and arm my copter with throttle down and right aileron, if you fly in mode 2 you probably use the rudder stick instead of the aileron one, that means you will simply have to change "Ail" to "Rud", all the rest will be exactly the same.
Let's go through what I've done:
CS7 will be ON if throttle stick is down.
CS8 and 9 will be ON if 3 conditions are met: aileron stick must be full right or full left and CS7 must be ON (remember we want CS7 to be on when throttle is down), the third and last condition is a 1,5 seconds delay, this means the first 2 conditions (CS7 and Ail>98 or <-98) have to be both true for at least 1,5 seconds, if they are true for less than that time, the switch won't be triggered.
We now move onto the custom functions tab:
The way we set our custom switches makes them temporary, but we want our armed/disarmed state to be permanent, the solution I came up with is to use global variables.
CF6 sets global variable GV1 to 1 when CS8 is triggered, viceversa CF7 sets the variable to 0 if CS9 is triggered, this way, CS8 will be on for a fraction of time, but GV1 will stay on permanently, at least until CS9 is triggered.
Now that we set these 2 custom functions we can go back to the custom switches tab and set the last custon switch: CSA.
This is very simple, we simply check GV1 value and turn CSA ON if the value is greater than 0, so a value of 1 will trigger it ON, and a value of 0 will leave it OFF.
DONE!
Now it's up to you, you have a custom switch that mimicks the armed/disarmed state of your flight controller, you can use it for whatever you want, the way I used it is the following:
This is what you do to start logging telemetry to your SD card:
And this is to start a timer:
Enjoy and if there's a better way to do this or a cool way to use this custom switch other than logging and starting a timer, please let me know!
Iacopo
Comments
man i wish we could get someone to post instruction for the tranis plus open tx 2.0.15 this above does not work.. the CSA is throwing me off bad no option for CSA
@Paul - Custom switches now = logical switches and custom functions now = special functions. Just treat CS* as L* and CF* as SF*. And the last step you question (Now that we set these 2 custom functions we can go back to the custom switches tab and set the last custon switch: CSA.
This is very simple, we simply check GV1 value and turn CSA ON if the value is greater than 0, so a value of 1 will trigger it ON, and a value of 0 will leave it OFF.) is shown in the first screenshot.
Works great! Thank you!
Im stuck on this part
Now that we set these 2 custom functions we can go back to the custom switches tab and set the last custon switch: CSA.
This is very simple, we simply check GV1 value and turn CSA ON if the value is greater than 0, so a value of 1 will trigger it ON, and a value of 0 will leave it OFF.
My transmitter uses 'Logical switches instead of the wording custom switches, so everything is L1 instead of CS1 . I cant seem to work out the CSA part.
is this one not screenshotted?
Thank you buddy :-)
Luis, I think you want to do what Justin did.
My method doesn't make the Taranis actually know if your copter is armed or not, but it's a good guess and works on different flight controllers, not only on APM based ones.
Hi
I was looking at your explanation, but with this programming you don't know if the vehicle is really armed or not, we only know that the radio sent a armed/disarmed command.
I believe we need something like is discussed here to have commands confirmed http://diydrones.com/forum/topics/amp-to-frsky-x8r-sport-converter?...
but I might be wrong. I'm testing the new OpenTX v2 firmware and can't test your suggestion.
I like the quadcopter on your digital display.
Justin: the name of the current flight mode is displayed in that text box, so that "DISARMED" text is just the name of a Flight Mode I created, that flight mode is enabled whenever my CSA switch is off.