Skip to content

1.2 script types

Udo edited this page Aug 16, 2024 · 4 revisions

The Different Types of Lua Scripts in Ethos

Under Ethos, there are various types of Lua scripts that are "optimized" for their specific tasks in terms of functionality.

The most common ones are:

Widget

The most well-known type is probably the widget. These Luas are used on the home screens.

Home screens, the screens that you see immediately after turning on the transmitter or that you can scroll through afterwards, have user-defined different layouts and thus frame sizes for a widget (up to full screen). One Lua script can be configured per frame. The Lua script essentially "lives" in this frame and sees it as its "scope of validity."

This means, for example, that when drawing, it cannot draw outside of this frame; the top left corner always has the coordinates 0,0, no matter where the frame is located on the screen.

image



System Tool

The system tool script is a "one-time script." It is manually started via the system menu, and no further actions are executed after it is exited.

image

A typical application is configuring devices such as (gyro) receivers, ESCs, redundancy boxes, etc.



Sourcescript

Anyone who has worked with Ethos for a while is familiar with the term "source" or "sources."

In many menus, "sources" from categories such as analog inputs, switches, telemetry values, etc., can be selected to provide values.

Once a source script is configured into a model, it can also provide (script-calculated) values.

Source scripts do not have a user interface and are activated via the "Lua" tile in the model configuration.

image



Task script

Here, tasks can be processed in the background. For example, event-controlled tasks that do not require displays on the screen or the output of values in the form of the "source" category.

Other scripts

Besides the scripts already mentioned above, there are other types with very specific areas of application, such as for RF modules like Multiprotocol, Ghost, ELRS, Crossfire.

Clone this wiki locally