Skip to content

1.2 script types

Udo edited this page Jul 5, 2024 · 4 revisions

The different types of Lua scripts in Ethos

In Ethos, there are various types of Lua scripts, which 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 Lua scripts are used on the home screens.

Home screens, which are the screens you see immediately after turning on the transmitter or can scroll through afterward, have user-defined different layouts and 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 "validity horizon."

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

System Tool

The system tool script is a "one-time script" that is manually started via the system menu, and no further actions are executed after exiting. A typical application is configuring devices such as (gyro) receivers, ESCs, redundancy boxes, etc.

Source Scripts

Anyone who has worked with Ethos for a while knows the term "source" or "sources." In many menus, "sources" from categories like 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.

Task Scripts

In these scripts, tasks can be processed in the background, for example, event-driven tasks that do not require displays on the screen or output of values in the form of the source category.

Other Scripts

Besides the scripts mentioned above, there are other types with very specific applications, for example, for RF modules like multiprotocol, Ghost, ELRS, Crossfire.

Clone this wiki locally