Custom Switches (page 8/13)
These are logic switches that are used to compare values and combine various conditions. More
precisely, they are a set of logical functions that can be used as switches. There are 24 such custom
switches in ErSky9x.
The first column shows the "operation", listing several arithmetic, logical and differential operations.
In arithmetical operations,
v1
and
v2
represent variables,
v
represents a value, and
ofs
represents
an offset (i.e., a constant).
Variables can be any source, i.e., all those available in mixers, plus the seven global variables and
all telemetry values. In logical operations the available sources are all the physical switches and the
other custom switches. Differential functions compare the changes in a variable since it was last
matched to another value.
Once the defined condition is met, the value of the switch will be “ON”.
Setting Up a Custom Switch
First we define the condition or operation. This can be: an arithmetic function, or a logical condition,
or an evaluation between two sources.
1. If you've selected a
regular condition
(v>offset, v<offset, |v|>offset or |v|<offset), you need to
specify a source for the value and an offset:
The source can be a stick, pot, PPM input, output channel or telemetry value.
The offset can be anywhere between -100 and +100. It will be the test point for the
condition.
For example: switch “ON” only if throttle is above 50% (THR > 50)
2. If you've selected a
logical condition
(AND, OR, XOR, Latch, F-Flop), the conditions of the two
selected switches are evaluated.
For example: switch “ON” if either ID1 or ID2 is ON (OR ID1 ID2).
3. If you've selected an
evaluation
(“==”, “>”, “<”, etc...), you need to select the two sources to be
compared.
For example: Switch “ON” only if CH1 is less than RUD (V1<V2 CH1 RUD)
AND Function
Custom switches also offer an extra
AND
condition. If this is selected in the first column, it must be
ON for the custom switch to become active.
Ersky9x Explained – version 1
page
33
of 45