Logical switches are probably the most highly effective options in FPV drone radios that run EdgeTX. It may be intimidating and complicated for newcomers. On this tutorial, I’ll clarify what logical switches are in easy phrases, how they work, and what you may truly use them for in FPV. If you’re flying quads and simply getting began with EdgeTX, that is a type of options you most likely received’t contact instantly. However when you perceive it, you’ll understand how highly effective it’s.
On the lookout for a brand new EdgeTX radio? Try our suggestions: https://oscarliang.com/radio-transmitter/
What’s Logical Swap
A logical change is a digital change inside your radio.
It’s NOT an actual bodily change you may flip together with your fingers. As an alternative, the radio turns it ON or OFF robotically primarily based on guidelines (circumstances) you program.
Bodily switches are sensible, but in addition fairly “dumb” as a result of they’ll solely be managed by the consumer. Logical switches allow you to create sensible conduct in your radio. They’re nice when a standard change isn’t sufficient.
For examples:
- “I would like the radio to warn me when RSSI will get too low”
- “I would like the radio to learn out voltage when battery will get low”
- “I would like the radio to reset timer 10 seconds after I disarm the quad”
So as an alternative of bodily flipping a change, the radio is doing the switching for you primarily based on logic, that’s why it’s referred to as a logical change.
And the likelihood is infinite, that’s what makes logical switches so helpful.
How one can Differentiate Bodily Switches and Logical Switches
- Bodily switches are labeled with letters akin to SA, SB, SC, SD, SE, SF, SG, SH, and many others.
- Logical switches are labeled L01, L02, L03, L04… (as much as L64 on most EdgeTX radios).
The place to Discover Logical Switches in EdgeTX
To seek out and create logical switches:
- Press the MDL button
- Press PAGE just a few occasions till you discover Logical Switches
Fundamental Construction of a Logical Swap
Every logical change has just a few settings, however crucial ones are:
- Operate
- V1
- V2
- non-obligatory AND change
- Length
- Delay
The essential concept is easy:
- Operate = what check the radio ought to carry out
- V1 = first worth, the factor being monitored
- V2 = second worth, the brink or comparability worth
For instance:
- Operate = a<x
- V1 = battery voltage
- V2 = 14.4V
Which means:
Flip this logical change on when battery voltage is lower than 14.4V
As soon as that occurs, the logical change turns ON (energetic).
Delay
This implies the situation has to remain true for not less than this period of time earlier than the logical change prompts. That’s helpful for avoiding false alarms. For instance, if RSSI (or battery voltage) dips for a cut up second, I’ll not need an alert instantly. I can add a delay so the warning solely triggers if the issue lasts lengthy sufficient.
Length
This controls how lengthy the logical change stays energetic. If I depart period at zero, it stays on solely whereas the situation is true. These options grow to be extra helpful as your EdgeTX setup will get extra superior, for easy setup you may depart it unchanged.
Frequent Logical Swap Features
- a = x → “1st worth equals to 2nd worth”
- a > x → “1st worth is larger than 2nd worth”
- a < x → “1st worth is lower than 2nd worth”
- AND → Each circumstances have to be true
- OR → Not less than one situation have to be true
- Edge → Detects when one thing simply modified (helpful for momentary actions)
- Sticky → Makes a change “latch” (keep on till one other situation turns it off)
There are lots of extra features accessible, verify EdgeTX handbook to study extra.
Observe which you can additionally use logical switches and bodily switches inside one other logical change (e.g. you may assign L1, L2, SA, SB and many others to the V1 and V2 fields of one other logical change). It means that you can mix a number of circumstances and create extra superior or difficult behaviors. It’s highly effective however can get complicated quick and turns into very onerous to debug later. Typically you wish to preserve your logic as flat and easy as attainable originally.
Instance: Low Battery Warning
This is likely one of the best and most helpful examples.
You can also make a logical change that claims: Activate when battery voltage is beneath 3.5V per cell.
- Navigate to Logical Switches in your radio
- Scroll to an empty line (for instance, L01) and press ENTER
- Configure the logical change as follows:
- Operate: a<x
- V1: RxBt
- V2: 3.5V (you may change it to any voltage you need)
- Delay: 3 seconds (this delay reduces false positives attributable to voltage sag throughout punchouts)
Within the Betaflight CLI, enter:
set report_cell_voltage = onsave
Now L01 turns ON each time your quad battery drops beneath 3.5V per cell.
Then in Particular Features, you should utilize L01 to play the worth “RxBt” (with an interval of 10s so it doesn’t get too annoying). I even have one other particular operate on the highest that performs the voltage once I press the SH change.
I’ve an entire tutorial that goes into element learn how to arrange low voltage alarm right here: https://oscarliang.com/edgetx-voltage-callout/
What Can You Use Logical Switches For?
Aside from Low battery warning, newbie pleasant makes use of of logical switches are:
- Low RSSI or low LQ warning: Use telemetry to warn you when your hyperlink high quality drops.
- Automated channel activation: Activate a channel, LED, or characteristic when a situation is met.
- Safer Arming: if throttle isn’t totally low, radio alerts you it’s not protected when making an attempt to arm
- Multi-purpose Knob: knob is already utilized in particular operate, however you may create a logical change that checks knob place, then use that logical change because the set off for one more particular operate
Every other artistic use of logical switches? Tell us within the feedback.
Ultimate Ideas
Logical switches sound extra difficult than they are surely. All they do is let me inform the radio:
“When this situation turns into true, deal with it like a change has been turned on.”
That situation is likely to be any radio controls, telemetry knowledge, or a mixture of issues
As soon as I’ve that logical change, I can use it wherever in EdgeTX similar to a standard change. You possibly can even use logical switches and bodily switches inside one other logical change to create actually advanced conduct.
And when you get comfy with them, you’ll begin discovering every kind of intelligent methods to make use of them.
