Ethos FrSKY X20 Controller
Logical Switches
(@page 129) Logical switches are virtual switches in Ethos that act as programmable triggers. They don't physically exist but function like conditional statements, activating or deactivating based on predefined inputs and conditions.
Key Features
- Activation: Logical switches are turned on (True) or off (False) by evaluating input conditions against their programming.
- Inputs: They can utilize various inputs, including:
- Physical controls (sticks, switches)
- Other logical switches
- Telemetry values (e.g., altitude, GPS data)
- Mixer values
- Timer values
- Gyro and trainer channels
- Future support for Lua model scripts
- Capacity: Ethos supports up to 100 logical switches.
- Management: You can easily add, edit, move, copy/paste, clone, or delete switches.
- Functions: A variety of comparison functions are available to define switch behavior:
- A-X (A minus X)
- A=X (A equals X)
- A>X (A greater than X)
- A<X (A less than X)
- And more...
Switch Parameters
Each logical switch has several configurable parameters:
-
Active Condition: This acts as a gate for the switch's output. It determines when the switch output is considered active. Options include:
- Always On: The switch is always active, regardless of any input.
- A-X (A Approximately Equal to X): True if the value of source 'A' is roughly equal to the user-defined value 'X' (within ~10%).
- A=X (A Exactly Equal to X): True only if the value of source 'A' precisely matches the user-defined value 'X'.
- A>X (A Greater Than X): True if the value of source 'A' exceeds the user-defined value 'X'.
- A<X (A Less Than X): True if the value of source 'A' is less than the user-defined value 'X'.
- A>X (Absolute Value of A Greater Than X): True if the absolute value of source 'A' is greater than 'X'.
- A<X (Absolute Value of A Less Than X): True if the absolute value of source 'A' is less than 'X'.
- Δ>X (Change in A Greater Than X): True if the change in value of source 'A' is greater than or equal to 'X' within a specified check interval.
- |Δ|>X (Absolute Change in A Greater Than X): True if the absolute value of the change in source 'A' is greater than or equal to 'X'.
- Range: True if the value of source 'A' falls within a specified range.
- AND: True only if all selected sources are true (ON).
- OR: True if at least one of the selected sources is true (ON).
- XOR (Exclusive OR): True only if exactly one of the selected sources is true (ON).
- Timer Generator: Toggles the switch on and off continuously for specified durations.
- Sticky: Latches the switch ON when the Trigger ON condition becomes True and remains ON until the Trigger OFF condition is met.
- Edge: Acts as a momentary switch, becoming True for a specified duration when its edge trigger conditions are met (Rising Edge, Falling Edge, Pulse).
-
Delay before active/inactive: This sets a delay before the switch activates or deactivates after the conditions are met.
-
Min Duration: This enforces a minimum duration for the switch to remain in the True state.
-
Comment: You can add comments to describe the switch's purpose.
Additional Options
- Trainer Input: You can configure switches to ignore inputs from the trainer input.
- Telemetry Use: If a telemetry sensor is used as the source for a logical switch, an active sensor will result in an active switch.
Accessing and Modifying Switches
- Access: Navigate to the "Logic Switches" section in the Ethos menu.
- Adding: Tap the "+" button to add a new logical switch.
- Modifying: Tap on an existing switch to access a popup menu with options to edit, delete, move, copy, clone, etc.
Example Use Cases
- Gear Switch with Delay: Use a logical switch to activate landing gear with a delay, preventing accidental retraction during takeoff.
- Telemetry-Based Warnings: Create a switch that activates an alarm when battery voltage drops below a critical threshold.
- Flight Mode Switching: Implement complex flight mode logic based on combinations of switch positions and telemetry data.