Skip to content

2. Options and supported AddOns

athertop edited this page Dec 20, 2016 · 11 revisions

Teensy code options and the AddOns supported by these options

This section describes the current configuration options which can be enabled within the Arduino code before writing the sketch to the teensy.

AddOns section in MavLink_FrSkySPort.ino looks like this:

/*
 * *******************************************************
 * *** Enable Addons/options:                          ***
 * *******************************************************
 */
//#define USE_FCS_SENSOR_INSTEAD_OF_APM_DATA              // Enable if you use a FrSky FCS Sensor.
//#define USE_FLVSS_FAKE_SENSOR_DATA                      // Enable if you want send fake cell info calculated from VFAS, please set MAXCELLs according your Number of LiPo Cells
//#define USE_SINGLE_CELL_MONITOR                         // Disable if you use a FrSky FLVSS Sensor. - Setup in LSCM Tab
//#define USE_AP_VOLTAGE_BATTERY_FROM_SINGLE_CELL_MONITOR // Use this only with enabled USE_SINGLE_CELL_MONITOR
//#define USE_RC_CHANNELS                                 // Use of RC_CHANNELS Informations ( RAW Input Valus of FC ) - enable if you use TEENSY_LED_SUPPORT.
//#define USE_TEENSY_LED_SUPPORT                          // Enable LED-Controller functionality
//#define POLLING_ENABLED                                 // Enable Sensor Polling - for use with Ultimate LRS (where Teensy connected to Taranis S.Port input directly).
//#define USE_MAV_RSSI                                    // Enable Mavlink RSSI on A3 (A4 will be 0)- in place of pitch/roll - required for Ultimate LRS
#define SEND_STATUS_TEXT_MESSAGE                        // Enable sending Status Text Messages to RC
#define AUTO_MAV_STREAM_CFG                             // Enable auto Mavlink SRn_ configuration - comment out for manual stream rate configuration

Remove // to enable AddOns:

  • If you use a FrSky FLVSS LiPo monitor sensor, then no changes are required - this will work by default

  • If you use a FrSky FCS SmartPort Sensor, enable USE_FCS_SENSOR_INSTEAD_OF_APM_DATA - this will prevent the Teensy from outputting Mavlink voltage data allowing FrSky FAS sensor to be used in its place.

  • If you want to build and use the Single Cell Monitor DIY solution, then enable USE_SINGLE_CELL_MONITOR and USE_AP_VOLTAGE_BATTERY_FROM_SINGLE_CELL_MONITOR. additionally configure the line #define MAXCELLS = with your cell count. Section 2.1 describes this AddOn in more detail and how to fine tune for more accurate voltage calibration.

  • If you don't have any LiPo cell monitoring solution in place (so you have neither a FLVSS sensor or the Single Cell Monitor DIY solution), and still want the telemetry screen to display Singe Cell Voltage, then enable USE_FLVSS_FAKE_SENSOR_DATA (this is recommended if you have no direct cell monitoring solution installed). This will take the Ardupilot battery voltage reading (provided by the APM battery monitor), and divide this by the cell count to provide simulated cell values through an emulated FLVSS sensor - used to replace real cell data in the LUA screen. This supports up to 12 cells in series.

Note - in the last two cases above, its important to also configure the line (around line #123): #define MAXCELLS 3 to the correct cell count for your model.

  • This project also supports the LED AddOn - by enabling the line //#define USE_TEENSY_LED_SUPPORT the teensy will run additional code to control one of the supported LED control schemes. See the section "LED Control" for further details.

  • For using #define POLLING_ENABLED and #define USE_MAV_RSSI in the code above, see the section "Ultimate LRS Support" for further details.

  • Finally - if your teensy is sharing a telemetry port with another device, only one of these devices can be wired to talk to the Pixhawk (I.e. have its Tx connecting to the telem port Rx) and this is likely to be the other device, I.e. not the Teensy - so devices such as: 3DR telemetry radio, OSD, or in the case of ULRS, a bluetooth adapter. In this shared configuration (where Teensy can not physically talk to the Pixhawk), there is no point having AUTO_MAV_STREAM_CFG enabled, so comment out #define AUTO_MAV_STREAM_CFG, which cuts down on the code in your compile to save resources. It will then be required for you to configure the SRn_ values manually in Ardupilot ( see Ardupilot Parameter Configuration for details).

Options implemented in LUA on Taranis

  • celinf.lua - Audio Message Minimum Cell Info config (implemeting this script is optional)

    This model/mixer script can be implemented to configure cell info alarms and voltage calls. This is detailed in its own section.

  • offset.lua - Battery meter calibration and Speed/Alt unit config, plus selection of Ardupilot Copter or Plane

    This model/mixer script provides a place to calibrate offsets for mAh and Wh readings. It also presently provides important speed and altitude unit display options. Finally, it provides a means to choose whether the model is a Copter or Plane. This script is detailed in its own section.

  • servce.lua - Keep your model maintained with service reminders to help