Integration Manual
Mandala variables
Autopilot algorithms
shiva
Comm ports
vcp
Controls mixer
controls
Core modules
mod
Data Broker
mdb
GPIO ports
controls.gpio
Inertial Navigation
ahrs
Node modules tree
node
PHY Multiplexer
ifc.mux
Protocols
protocols
Telemetry streamer
telemetry
Vehicle Identity
identity
Vehicle limits
vehicle
WASM engine
script
WASM engine
Nodes:ghanta
nav
sim
com
ifc
| Module:script
| Parameters:Script
This module provides virtual machine to execute WASM scripts onboard. The scripts are pre-compiled by the GCS and stored in node non-volatile memory along with the source code.
Key features
- Efficient and extremely fast scripting engine;
- LLVM compiler support with modern C++11;
- Native functions to access node resources;
- Functions (events) can be invoked by mission, or per GCS command;
Usage examples
- Define and automate UAV safety procedures, specific to a vehicle;
- Implement specific payload protocol to communicate via VCP;
- Implement custom control algorithm and override autopilot;
- Collect specific sensors data and send it to custom GCS plugin via VCP stream;
Script examples are available with the GCS distribution.
Configuration parameters
-
Script
Scripting engine
-
restart
Restartcommand
-
start
Startcommand
-
stop
Stopcommand
-
mode
Scripting engine modeoption
[off,manual,auto]
off
: the module is turned off;manual
: the script is available for editing and uploading, but started manually, via command from GCS;auto
: script will be executed automatically upon power up;
-
code
Script source codescript
Contains pre-compiled WASM binary bytecode and packed source code;
-