Loading...
 

Teensy Telemetry Sound Extension

This is an extension to the Teensy Telemetry Project at http://openbrainiacs.com/tiki-index.php?page=Teensy+Telemetry+Project

This project simplifies settiing up sounds that are triggered from telemetry data.  You can also use extended telemetry data.  Extended data is the MAVLINK data that are not handled by the FrSky protocol:

  • Armed status
  • Flight modes
  • HDOP
  • Messages from the flight controller

The most obvious use of this is to play sounds based when this data has met specific conditions.  For example, playing a track when armed or disarmed, announcing the flight mode after it's changed.  You can already setup sounds based on switch settings, but playing them based on the actual information in the flight controller is powerful.

We ran into some limitations using only the OpenTX logical switches to play tracks.  The original configuration (Technique 1) was made by bionicbone http://www.rcgroups.com/forums/showpost.php?p=33424949&postcount=195.  He used the new GV (Global Variable's) that were set by the 2.13 firmware along with OpenTX settings to get 90% setup.  This may be exactly, or even more than most people want and is a great example of how to add your own functionality based on both the Standard and Extended telemetry data. 

A second technique (Technique 2) was added to assist with things that were difficult with the OpenTX settings alone.  We added a new telemetry page (sftsound.lua) that does nothing but run in the background and check for changes to the Extended telemetry data.  This new sound file uses the same GV values that are used if you were to configure everything using OpenTX logical switches (Technique 1) but require editing a Lua file.

Support and Community

There is an active blog for this project at http://www.rcgroups.com/forums/showthread.php?t=2562859

Global Variables used by Technique 1 and Technique 2

The main telemetry page (sfthud1.lua) included in the 2.1.13 or later releases set the following GV's that can be used in Logical Switch settings on OpenTX or other Lua files in OpenTX.

GV1 - armed status
-1 - not available
0 - Disarmed
1 - Armed

GV2 - flight mode number
-1 - not available
0 - Stabilize
1 - Acro
2 - Altitude Hold
> 2 - see mission planner full parameter list

GV3 - message severity (momentary)
-1 - no message
0 - emergency - System is unusable. This is a "panic" condition
1 - alert - Action should be taken immediately. Indicates error in non-critical systems
2 - crititcal - Action must be taken immediately. Indicates failure in a primary system
3 - error - Indicates an error in secondary/redundant systems
4 - warning - Indicates an error in secondary/redundant systems
5 - notice - An unusual event has occured, though not an error condition. This should be investigated for the root cause
6 - info - Normal operational messages. Useful for logging. No action is required for these messages
7 - debug - Useful non-operational messages that can assist in debugging. These should not occur during normal operation

GV4 - HDOP value * 10
-1 - not available
n - where n = HDOP value * 10

GV5 - sequence number (diagnostics)
-1 - not available
n - where n = sequence number

Using the GV values with OpenTX settings - Technique 1

Please see this post for information about setting this up http://www.rcgroups.com/forums/showpost.php?p=33424949&postcount=195

Using the GV values with Lua - Technique 2

The sftsounds.lua file is currently not configured to play any sounds.  As a minimum, the file must be edited and the name of the tracks you wish to use must be typed into the appropriate place in the top of the file.  There is more information in the top of sftsounds.lua.

The sftsounds.lua file is a standard telemetry Lua script and needs to be added to one of the screens on the model's telemetry settings page.  It does most of it's work in the background and the screen's display only shows diagnostic information.

You can configure other things in sftsounds.lua such as the threshold values for various hdop levels.

Future

Please feel free to post any suggestions or any sound files and other configuration changes

Support and Community

There is an active blog for this project at http://www.rcgroups.com/forums/showthread.php?t=2562859#post33462313