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

Range sensor on the uavcan bus. More...

#include "range_sensor_uavcan.h"
#include "uavcan/uavcan.h"
#include "core/abi.h"
#include "modules/datalink/telemetry.h"
+ Include dependency graph for range_sensor_uavcan.c:

Go to the source code of this file.

Data Structures

struct  range_sensor_uavcan_t
 

Macros

#define UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_ID   1050
 
#define UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_SIGNATURE   (0x68FFFE70FC771952ULL)
 
#define UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_MAX_SIZE   ((120 + 7)/8)
 

Functions

static void range_sensor_uavcan_send_lidar (struct transport_tx *trans, struct link_device *dev)
 
static void range_sensor_uavcan_cb (struct uavcan_iface_t *iface, CanardRxTransfer *transfer)
 
void range_sensor_uavcan_init (void)
 

Variables

static struct range_sensor_uavcan_t range_sensor_uavcan = {0}
 
static uavcan_event range_sensor_uavcan_ev
 

Detailed Description

Range sensor on the uavcan bus.

Definition in file range_sensor_uavcan.c.


Data Structure Documentation

◆ range_sensor_uavcan_t

struct range_sensor_uavcan_t

Definition at line 37 of file range_sensor_uavcan.c.

Data Fields
float range
uint8_t reading_type

Macro Definition Documentation

◆ UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_ID

#define UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_ID   1050

Definition at line 32 of file range_sensor_uavcan.c.

◆ UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_MAX_SIZE

#define UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_MAX_SIZE   ((120 + 7)/8)

Definition at line 34 of file range_sensor_uavcan.c.

◆ UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_SIGNATURE

#define UAVCAN_EQUIPMENT_RANGE_SENSOR_MEASUREMENT_SIGNATURE   (0x68FFFE70FC771952ULL)

Definition at line 33 of file range_sensor_uavcan.c.

Function Documentation

◆ range_sensor_uavcan_cb()

static void range_sensor_uavcan_cb ( struct uavcan_iface_t iface,
CanardRxTransfer *  transfer 
)
static

Definition at line 60 of file range_sensor_uavcan.c.

References AGL_UAVCAN_ID, get_sys_time_usec(), range_sensor_uavcan_t::range, range_sensor_uavcan, range_sensor_uavcan_t::reading_type, and transfer().

Referenced by range_sensor_uavcan_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ range_sensor_uavcan_init()

◆ range_sensor_uavcan_send_lidar()

static void range_sensor_uavcan_send_lidar ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 49 of file range_sensor_uavcan.c.

References dev, range_sensor_uavcan_t::range, range_sensor_uavcan, and range_sensor_uavcan_t::reading_type.

Referenced by range_sensor_uavcan_init().

+ Here is the caller graph for this function:

Variable Documentation

◆ range_sensor_uavcan

struct range_sensor_uavcan_t range_sensor_uavcan = {0}
static

Definition at line 1 of file range_sensor_uavcan.c.

Referenced by range_sensor_uavcan_cb(), and range_sensor_uavcan_send_lidar().

◆ range_sensor_uavcan_ev

uavcan_event range_sensor_uavcan_ev
static

Definition at line 44 of file range_sensor_uavcan.c.

Referenced by range_sensor_uavcan_init().