User Defines Explained¶
With more features being added consistently,
./src/user_defines.txt has gotten complicated 🤷♂️. So we will break it down! 🔨
*Note: This is the full list of currently supported User Defines and would help you should you intend to compile the firmware using the Toolchain or Manual Mode on the ExpressLRS Configurator.
- If these are used in Configurator Manual Mode or user_defines.txt, the value must begin with
- A user define that begins with
#is "commented out", i.e. not active.
MY_BINDING_PHRASE="default ExpressLRS binding phrase"
This feature can, but should not be used as a model match feature (to lock a single specific transmitter to a single specific receiver). For that use, the Model Match option.
* This phrase gets md5 hashed and gets built into the binary you will be flashing.
Regulatory_Domain_AU_915 Regulatory_Domain_EU_868 Regulatory_Domain_AU_433 Regulatory_Domain_EU_433 Regulatory_Domain_FCC_915 Regulatory_Domain_ISM_2400
EU 868🇪🇺 is compliant to the frequency but is not LBT compliant 👂 . Every other band is near compliant 👿 but may not be fully compliant for your regulatory domain.
Default value is 320LU. If you want to change that you have to suffix your milliseconds value with LU. For example, in order to specify 100 ms telemetry update rate you have to enter it like this: 100LU.
Typically, you want to keep 320LU value for OpenTX based radios, and 100LU for ErskyTx ones.
Output Power Limit¶
By default the max power of hardware is limited to what it can safely output without extra cooling. Some hardware supports increasing the power by enabling the following option. Check the supported hardware page to see if this is available and what cooling modifications can be made. By enabling this, you are risking perminant damage to your hardware, sometimes even when you add extra cooling. For example, R9M modules will burn out without cooling.
AUX1 is the channel ExpressLRS uses to detect "ARMED", and this feature assumes that a low value of the arm switch is disarmed, and a high value is armed. OpenTX can invert your switch if you prefer it to be mechanically inverted. It is best not to enable no sync on arm when you are first setting up ExpressLRS as it can be a source of confusion.
0, but is experimental (even in 1.0) and is best left disabled.
Both require OpenTX
2.3.12 or above. In order to install it, you will have to use OpenTX companion application.
Deviation radio users such as those with the T8SGv2/v3 should disable this feature.
You can also use EdgeTX.
LOCK_ON_FIRST_CONNECTIONis used, ELRS will not cycle after a disconnect, but instead just stay on whatever rate the last connection was. This makes connection re-establishment quick, because the RX is always listening at the proper rate. This is generally what everyone wants, but there is utility in being able to switch the TX to the lowest rate to get more range to re-establish a link with a downed model, which can't happen if the RX is locked at the previous rate.
When cycling through the rates, the RX starts with the fastest packet rate and works down to the slowest, then repeats. It waits
PACKET_INTERVAL * PACKS_PER_HOP * HOP_COUNT * 1.1 at each rate. Example: 4ms * 4 * 80 * 1.1 = 1.408s for 250Hz. The duration is extended 10x if a valid packet is received during that time. Even with
LOCK_ON_FIRST_CONNECTION, the rate can be changed by changing the TX rate using ELRS.lua while connected, or by power cycling the RX.
DYNPOWER_THRESH_UPdBm from the sensitivity limit, the algorithm will increase the power output by one step. Similarly, if the RSSI is above
DYNPOWER_THRESH_DNfrom the sensitivity limit, the power will be decreased one step.
ESP32based TXes (will not work with modules without built-in inversion/uninversion), but enables compatibility with radios that output inverted CRSF, such as the FrSky QX7, TBS Tango 2, RadioMaster TX16S. You want to keep this enabled in most of the cases. If your radio is T8SG V2 or you use Deviation firmware turn this setting off.
ESP8266/ESP8285based RXes. Invert the TX pin in the receiver code to allow an inverted RX pin on the flight controller to be used (usually labeled SBUS input or RXI). Inverted CRSF output. RX pin (telemetry) is unaffected. Update via_BetaflightPassthrough will not work, only via_Wifi. Note that just because this description includes the word SBUS, it doesn't mean the RX will output SBUS. It is still CRSF protocol, only inverted, so CRSF should still be the receiver protocol selected in the flight controller software.
F4 FCswhich only have an inverted receiver input UART RX. 🔼. This is only one way, so you lose the telemetry downlink to your radio as well as passthrough flashing. Enabling this turns on CRSF protocol output on the
S.BUS🚌 pin on your
set serialrx_inverted = ONmay also be needed within Betaflight 🐝 for compatibility
ESP8285on it if no TX connection is established after N seconds from boot (the 30 is the time). This enables pushing firmware updates to the RX by connecting to its wifi network and visiting
New in version 2.0
These options set Home Network Access for your Wifi-enabled hardware. With these set, the devices will try connecting to your existing WiFi Network when you click on "(Wifi) Update" on the ExpressLRS Lua script (for some Tx Modules) or automatically after your set interval time. Once the devices connect to your Home WiFi, the Update page can be accessed anywhere, from any device on the same network. Tx Module Wifi update page can be reached using the address http://elrs_tx.local, while receivers' update page can be reached via http://elrs_rx.local.
Wifi mode will first try to connect to the network specified before falling back and creating a new wifi network. The Home Network can also be modified from the webui.
JUST_BEEP_ONCE MY_STARTUP_MELODY="<music string>|<bpm>|<semitone offset>" -or- MY_STARTUP_MELODY="<rtttl string>"
For all your customization needs, use
DMY_STARTUP_MELODY to define your own startup melody using the BlHeli32 or RTTTL syntax. For BLHeli32, the parameters
music string and
bpm are required, whereas
semitone offset is optional to transpose the entire melody up or down by the defined amount of semitones.
Example BlHeli32 melodies are available on Rox Wolfs youtube channel, some experimentation may be required though. To write your own melody, this (Sheet Music 101) and this (BLHeli Piano) are useful resources.
The build process also supports RTTTL-formatted ringtone strings. RTTTL melodies are delimited by colons
: and start with a description versus the BLHeli style with have pipes