Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
telemetry.c File Reference

Periodic telemetry system utility function. More...

#include "modules/datalink/telemetry_common.h"
#include "modules/datalink/telemetry.h"
#include "generated/periodic_telemetry.h"
#include "modules/datalink/downlink.h"
+ Include dependency graph for telemetry.c:

Go to the source code of this file.

Functions

int8_t register_periodic_telemetry (struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
 Register a telemetry callback function. More...
 
void telemetry_reporting_task (void)
 Peridioc task Send a series of initialisation messages followed by a stream of periodic ones. More...
 
void periodic_telemetry_err_report (uint8_t _process, uint8_t _mode, uint8_t _id)
 Send an error report when trying to send message that as not been register. More...
 

Variables

struct telemetry_cb_slots telemetry_cbs [TELEMETRY_PPRZ_NB_MSG] = TELEMETRY_PPRZ_CBS
 
struct periodic_telemetry pprz_telemetry = { TELEMETRY_PPRZ_NB_MSG, telemetry_cbs }
 Global telemetry structure. More...
 

Detailed Description

Periodic telemetry system utility function.

Definition in file telemetry.c.

Function Documentation

◆ periodic_telemetry_err_report()

void periodic_telemetry_err_report ( uint8_t  _process,
uint8_t  _mode,
uint8_t  _id 
)

Send an error report when trying to send message that as not been register.

Parameters
_processtelemetry process id
_modetelemetry mode
_idid of the message in telemetry system (see var/<AC>/generated/periodic_telemetry.h)

Definition at line 115 of file telemetry.c.

References DefaultChannel, DefaultDevice, and mode.

◆ register_periodic_telemetry()

int8_t register_periodic_telemetry ( struct periodic_telemetry _pt,
uint8_t  _id,
telemetry_cb  _cb 
)

Register a telemetry callback function.

Parameters
_ptperiodic telemetry structure to register
<em>idmessage ID (use PPRZ_MSG_ID<message_name> define)
_cbcallback function, called according to telemetry mode and specified period
Returns
-1 on failure to register, index of callback otherwise

Definition at line 51 of file telemetry.c.

References periodic_telemetry::cbs, telemetry_cb_slots::id, periodic_telemetry::nb, telemetry_cb_slots::slots, and TELEMETRY_NB_CBS.

Referenced by actuators_bebop_init(), actuators_dshot_arch_init(), actuators_uavcan_init(), adc_generic_init(), ahrs_aligner_init(), ahrs_dcm_wrapper_init(), ahrs_fc_wrapper_init(), ahrs_finv_wrapper_init(), ahrs_icq_wrapper_init(), ahrs_madgwick_wrapper_init(), ahrs_mlkf_wrapper_init(), ahrs_vectornav_init(), ahrs_vectornav_wrapper_init(), air_data_init(), airspeed_ets_init(), airspeed_uavcan_init(), aoa_pwm_init(), approach_moving_target_init(), autopilot_firmware_init(), autopilot_init(), baro_bmp280_init(), battery_monitor_init(), bluegiga_init(), cam_init(), can_fuelcell_init(), commands_init(), ctc_init(), ctrl_windtunnel_init(), dcf_init(), detect_gate_init(), digital_cam_uart_init(), downlink_init(), dragspeed_init(), ekf_aw_wrapper_init(), esc32_init(), gec_dl_init(), gps_init(), gps_piksi_init(), guidance_h_init(), guidance_hybrid_h_run_accel(), guidance_indi_init(), guidance_pid_h_run(), guidance_v_init(), gvf_init(), gvf_parametric_init(), h_ctl_init(), hff_init(), hott_init(), i2c_init(), imu_heater_init(), imu_init(), imu_vectornav_init(), init_parachute(), ins_ekf2_init(), ins_ext_pose_init(), ins_float_invariant_init(), ins_float_invariant_wrapper_init(), ins_flow_init(), ins_gps_passthrough_init(), ins_int_init(), ins_mekf_wind_wrapper_init(), ins_vectornav_init(), intermcu_init(), jevois_mavlink_init(), main_init(), main_recovery_init(), mateksys3901l0x_init(), mavlink_init(), max7456_init(), mission_init(), motor_mixing_init(), ms45xx_i2c_init(), nav_init(), nav_rotorcraft_init(), nav_rover_init(), nav_survey_rectangle_rotorcraft_init(), navdata_init(), oneloop_andi_init(), optical_flow_hover_init(), optical_flow_landing_init(), opticflow_module_init(), pca9685_i2c_init(), power_uavcan_init(), ppm_init(), radio_control_cc2500_init(), radio_control_init(), range_sensor_uavcan_init(), relative_localization_filter_init(), rotorcraft_cam_init(), rotwing_state_init(), rpm_sensor_init(), sbus_dual_init(), sbus_init(), sdlog_chibios_init(), sdp3x_init(), stabilization_attitude_euler_float_init(), stabilization_attitude_euler_int_init(), stabilization_attitude_quat_float_init(), stabilization_attitude_quat_int_init(), stabilization_indi_init(), stabilization_init(), stabilization_rate_init(), superbitrf_init(), sys_id_chirp_init(), sys_id_doublet_init(), sys_id_wave_init(), target_pos_init(), temp_adc_init(), tfmini_i2c_init(), tfmini_init(), throttle_curve_init(), uart_periph_init(), uav_recovery_init(), vff_init(), waypoints_init(), wind_estimation_quadrotor_init(), and wind_estimator_init().

◆ telemetry_reporting_task()

void telemetry_reporting_task ( void  )

Peridioc task Send a series of initialisation messages followed by a stream of periodic ones.

Periodic task.

Definition at line 77 of file telemetry.c.

References autopilot_send_version(), DefaultChannel, DefaultDevice, and DefaultPeriodic.

+ Here is the call graph for this function:

Variable Documentation

◆ pprz_telemetry

struct periodic_telemetry pprz_telemetry = { TELEMETRY_PPRZ_NB_MSG, telemetry_cbs }

Global telemetry structure.

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

Definition at line 1 of file telemetry.c.

◆ telemetry_cbs

struct telemetry_cb_slots telemetry_cbs[TELEMETRY_PPRZ_NB_MSG] = TELEMETRY_PPRZ_CBS

Definition at line 1 of file telemetry.c.