Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
rust_demo_module module

Simple rust module

It doesn't do much besides allocating a vector and immediately freeying it afterwards. Meant only as an example.

More info on Paparazzi wiki: https://wiki.paparazziuav.org/wiki/Rust

Example for airframe file

Add to your firmware section:

<module name="rust_demo_module"/>

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

  • rust_periodic()
    • Frequency in Hz: 1.
    • Autorun: TRUE
      Periodic function automatically starts after init.

Files

Header Files

The following headers are automatically included in modules.h

Raw rust_demo_module.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="rust_demo_module" dir="rust/demo_module">
<doc>
<description>
Simple rust module. It doesn't do much besides allocating a vector
and immediately freeying it afterwards.
Meant only as an example.
More info on Paparazzi wiki: https://wiki.paparazziuav.org/wiki/Rust
</description>
</doc>
QÒl~Í
:␆N{ÍU
0­!€?
␛ÿ±tÍU
-->
<header>
<file name="rust_demo_module.h" />
</header>
QÒl~
P­!€?
-->
<init fun="rust_function()"/>
<periodic fun="rust_periodic()" freq="1." autorun="TRUE"/>
<makefile target="ap|nps">
QÒl~
5*‚\␅
:␆N{ÍU
<ƒ‚\␅
<ƒ‚\␅
␘Gm~ÍU
<ƒ‚\␅
␘Gm~ÍU
-->
<raw>
MODULE_PATH = $(PAPARAZZI_SRC)/sw/airborne/modules/rust/demo_module
RUST_MODULES += $(MODULE_PATH)
RUST_DIRS += $(MODULE_PATH)/target/$(RUST_ARCH)/release
RUST_LIBS += -lrust_demo_module
</raw>
</makefile>
</module>