Skip to content

Commit

Permalink
content: usage: advanced: introduce custom Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ES-Alexander committed Jan 2, 2025
1 parent fe2b43b commit 60262c3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
Binary file added content/usage/advanced/custom-actions-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/usage/advanced/custom-http-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/usage/advanced/custom-mavlink-action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions content/usage/advanced/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,34 @@ If you want a similar feature for joystick button functions, consider assigning
can be triggered.
{% end %}

### Custom Actions

Cockpit's Action system provides a set of functionalities that can be triggered from any of Cockpit's
supported input sources (e.g. joystick buttons, interface elements, other Actions, etc). There are
some predefined ones, but it is also possible to define (and export or import) custom Actions with a
few different approaches:

{{ easy_image(src="custom-actions-config", width=500) }}

- **MAVLink Message Actions** are the most confined, and allow sending arbitrary
[MAVLink messages](https://mavlink.io/en/messages/common.html) and
[commands](https://mavlink.io/en/messages/common.html#mav_commands) to the vehicle and any other
components in your MAVLink system
{{ easy_image(src="custom-mavlink-action", width=400) }}
- **HTTP Request Actions** can send arbitrary HTTP requests, including custom URL parameters, headers,
and a JSON body
- These are best for basic communication with arbitrary APIs
{{ easy_image(src="custom-http-action", width=400, center=true) }}
- **JavaScript Actions** are a blank canvas, with all the possibilities (but also the complexities) of
programming your own functionalities
{{ easy_image(src="custom-javascript-action", width=500, center=true) }}

Existing custom Actions can be edited, run manually (to test them), exported, or deleted.

{% note() %}
More detailed breakdowns and examples will be coming in future.
{% end %}

## Status and Recordings

### Video Library
Expand Down

0 comments on commit 60262c3

Please sign in to comment.