FrSKY Taranis - arming warning system for INAV

This tutorial will show you how to add checks for iNav arming in to your Taranis. iNav will not let the flight controller arm under certain conditions, such as the throttle is raised or launch mode is enabled in flight. With this system, the Taranis will help you discover what's wrong if you attempt to arm. This can be really useful in an accidental disarm.

How this is set up

This system works by taking the control of arming away from a simple switch. Instead it uses a global variable to store the arm state (armed - disarmed - disarmed requiring action), logical switches to decide what's happening, and special functions to set the state of arm.

For this tutorial, I have a arm switch on SF (towards you is disarmed), launch mode on SD (centre position), and auto tune on SG (towards you is enabled). I will use channel 5 to send the arm state to the flight controller. I have also separated blocks in the logical switches and special functions to make it easier to understand. These blocks can be put together so long as you adjust the logical switch numbers appropriately.

The arm state variable

We will get started nice and simply with the arm state variable. This keeps track of whether the system is armed or not. There are 3 options for the arm state:

  1. Disarmed and action needed - This is triggered when you try to arm but the checks fail.
  2. Disarmed - the normal disarmed state, activated when the switch is in the disarm position.
  3. Armed - all checks have been passed, so really arm the model.

To set this variable, go to the Flight Modes tab and for the default flight mode set GVAR1's name to Arm and make sure the value is set to 0.

Image showing the Global variable GVAR1 named 'Arm' and set to 0

Logical switches

The next step is to create the logic for the tests. I've broken this down in to smaller sections to make it easier and so that you can add your own logic to the tests.

Are we flying?

Some of the tests that we perform, we only want to check when we're flying. Depending the setup, this could be done via telemetry, but I've chosen to use a pure Taranis method to estimate as to whether the model is flying or not. The checks I'm using are:

Image showing the logical switches to detect flight.

Standard Test

This is a test which will be performed every time the arm switch is thrown. I'll show checking the throttle is high, but it could be used on any switch that you want off every time you arm.

Image showing the logical switches for a standard test.

Tests for in flight re-arms only

This test is only performed when it's thought the model is flying. I'll show this check using an auto launch switch (SD-).

Image showing the logical switches for an in flight test.

Set the system to armed

The next block checks the tests to see if the system can be armed.

Image showing the logical switches to check to see if the system can arm.

Managing the system arm state

This system uses an arming state to monitor and decide how to work. This last section of logical switches check the arm state and also has the logic to set it to disarmed and action needed. The only thing the switch (SF) does is inform the system that you want to arm, and disarm.

Image showing the logical switches for checking and managing the arm state.

The following checks set the state to disarmed and action needed. Which means there is a switch in the wrong place, stopping the system from arming.

Special Functions

The final thing we need to do, is tie the system together with some special functions. These set the arm state and give feedback if any tests fail.

Image showing the special functions for the arming system.

The first section sets the arm state for the system.

The next section actually sends the armed/disarmed state to the flight controller. I'm using channel 5, but feel free to put it on whatever channel you like. Combining it with flight modes, like in my flight modes and arming on a single channel tutorial, is also fine.

The final section is for the alerts. You would need custom sound files to give the correct instructions, such as "Lower throttle to arm" or "Disable launch mode to arm".

This should give you a working system that performs tests before arming the model, and alerts you to what is stopping arming from taking place.

Full OpenTX Code

Select the first Logical Switch and first Special Function positions available on your Model

Logical Switches

# Function V1 V2 AND Switch Duration Delay
L01 a > x Thr 98 L13 --- ---
L02 AND !L13 --- --- --- 25.0
L03 Stcky L01 L02 --- --- N/A
L04 a > x Thr -98 --- 0.5 N/A
L05 AND L04 !L13 SF↑ --- ---
L06 a = x SD 0 --- --- ---
L07 AND !L06 SF↑ --- --- N/A
L08 AND L07 !L13 L03 --- ---
L09 AND !L13 !L03 --- --- ---
L10 AND L03 L06 !L13 --- ---
L11 AND L09 !L10 --- --- ---
L12 AND L11 L14 SF↑ --- ---
L13 a = x GV1:Arm 1 --- --- ---
L14 a = x GV1:Arm 0 --- --- ---
L15 OR L08 L05 --- --- ---
L16 Stcky L15 SF↓ --- --- ---

Special Functions

# Switch Action Parameters Enable
SF01 SF↓ Adjust GV1:Arm Value 0 ✔ ON
SF02 L16 Adjust GV1:Arm Value -1 ✔ ON
SF03 L12 Adjust GV1:Arm Value 1 ✔ ON
SF04 L13 Override CH5 100 ✔ ON
SF05 !L13 Override CH5 -100 ✔ ON
SF06 L08 Play Track i_tutarm ---
SF07 L05 Play Track i_ltarm ---
SF08 L13 Play Track i_tarm ---
SF09 !L13 Play Track i_tdarm ---