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

Airspeed sensor on the uavcan bus. More...

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

Go to the source code of this file.

Macros

#define AIRSPEED_UAVCAN_SEND_ABI   true
 
#define AIRSPEED_UAVCAN_DIFF_P_SCALE   1.0f
 
#define UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_ID   1027
 
#define UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_SIGNATURE   (0xC77DF38BA122F5DAULL)
 
#define UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_MAX_SIZE   ((397 + 7)/8)
 

Functions

static void airspeed_uavcan_downlink (struct transport_tx *trans, struct link_device *dev)
 
static void airspeed_uavcan_cb (struct uavcan_iface_t *iface, CanardRxTransfer *transfer)
 
void airspeed_uavcan_init (void)
 
void airspeed_uavcan_autoset_offset (bool set)
 

Variables

struct airspeed_uavcan_t airspeed_uavcan = {0}
 
static uavcan_event airspeed_uavcan_ev
 

Detailed Description

Airspeed sensor on the uavcan bus.

Definition in file airspeed_uavcan.c.

Macro Definition Documentation

◆ AIRSPEED_UAVCAN_DIFF_P_SCALE

#define AIRSPEED_UAVCAN_DIFF_P_SCALE   1.0f

Definition at line 37 of file airspeed_uavcan.c.

◆ AIRSPEED_UAVCAN_SEND_ABI

#define AIRSPEED_UAVCAN_SEND_ABI   true

Definition at line 32 of file airspeed_uavcan.c.

◆ UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_ID

#define UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_ID   1027

Definition at line 56 of file airspeed_uavcan.c.

◆ UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_MAX_SIZE

#define UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_MAX_SIZE   ((397 + 7)/8)

Definition at line 58 of file airspeed_uavcan.c.

◆ UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_SIGNATURE

#define UAVCAN_EQUIPMENT_AIR_DATA_RAWAIRDATA_SIGNATURE   (0xC77DF38BA122F5DAULL)

Definition at line 57 of file airspeed_uavcan.c.

Function Documentation

◆ airspeed_uavcan_autoset_offset()

void airspeed_uavcan_autoset_offset ( bool  set)

◆ airspeed_uavcan_cb()

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

Definition at line 87 of file airspeed_uavcan.c.

References airspeed_filter, airspeed_uavcan, airspeed_uavcan_t::diff_p, airspeed_uavcan_t::diff_p_offset, airspeed_uavcan_t::diff_p_scale, airspeed_uavcan_t::temperature, transfer(), UAVCAN_SENDER_ID, and update_butterworth_2_low_pass().

Referenced by airspeed_uavcan_init().

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

◆ airspeed_uavcan_downlink()

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

Definition at line 67 of file airspeed_uavcan.c.

References airspeed_uavcan, dev, airspeed_uavcan_t::diff_p, offset, sign(), airspeed_uavcan_t::temperature, and UAVCAN_SENDER_ID.

Referenced by airspeed_uavcan_init().

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

◆ airspeed_uavcan_init()

Variable Documentation

◆ airspeed_uavcan

◆ airspeed_uavcan_ev

uavcan_event airspeed_uavcan_ev
static

Definition at line 62 of file airspeed_uavcan.c.

Referenced by airspeed_uavcan_init().