Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
telemetry.h File Reference
#include "std.h"
#include "mcu_periph/uart.h"
#include "generated/periodic_telemetry.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for telemetry.h:

Go to the source code of this file.

Macros

#define DefaultPeriodic   (&pprz_telemetry)
 Set default periodic telemetry. More...
 

Variables

struct periodic_telemetry pprz_telemetry
 Global telemetry structure. More...
 

Detailed Description

Periodic telemetry system header (includes downlink utility and generated code).

In order to use it a subsystem/module:

  • include this header:
  • write a callback function:
    void your_callback(void) {
    // your code to send a telemetry message goes here
    }
  • register your callback function (if the message name doesn't match one of the names in your telemetry xml file or is already registered, the function return FALSE)
    register_periodic_telemetry(&your_telemetry_struct, DL_<YOUR_MESSAGE_NAME>, your_callback);
    In most cases, the default telemetry structure should be used (replace &your_telemetry_struct by DefaultPeriodic in the register function).

Definition in file telemetry.h.

Macro Definition Documentation

◆ DefaultPeriodic

#define DefaultPeriodic   (&pprz_telemetry)

Set default periodic telemetry.

Definition at line 66 of file telemetry.h.

Variable Documentation

◆ pprz_telemetry

struct periodic_telemetry pprz_telemetry

Global telemetry structure.

Contains the list of message names and registered callbacks. Filled with generated structure from periodic_telemetry.h

Definition at line 37 of file telemetry.c.

telemetry.h
register_periodic_telemetry
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
Definition: telemetry.c:46