29#include "uavcan.equipment.ahrs.MagneticFieldStrength.h"
30#include "uavcan.equipment.ahrs.MagneticFieldStrength2.h"
44 struct uavcan_equipment_ahrs_MagneticFieldStrength msg;
45 if(uavcan_equipment_ahrs_MagneticFieldStrength_decode(
transfer, &msg)) {
51 msg.magnetic_field_ga[0] * 8192,
52 msg.magnetic_field_ga[1] * 8192,
53 msg.magnetic_field_ga[2] * 8192,
58#if MAG_UAVCAN_SYNC_SEND
69 struct uavcan_equipment_ahrs_MagneticFieldStrength2 msg;
70 if(uavcan_equipment_ahrs_MagneticFieldStrength2_decode(
transfer, &msg)) {
76 msg.magnetic_field_ga[0] * 8192,
77 msg.magnetic_field_ga[1] * 8192,
78 msg.magnetic_field_ga[2] * 8192,
84#if MAG_UAVCAN_SYNC_SEND
102 UAVCAN_EQUIPMENT_AHRS_MAGNETICFIELDSTRENGTH_ID,
103 UAVCAN_EQUIPMENT_AHRS_MAGNETICFIELDSTRENGTH_SIGNATURE,
107 UAVCAN_EQUIPMENT_AHRS_MAGNETICFIELDSTRENGTH2_ID,
108 UAVCAN_EQUIPMENT_AHRS_MAGNETICFIELDSTRENGTH2_SIGNATURE,
Main include for ABI (AirBorneInterface).
#define MAG_UAVCAN_SENDER_ID
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Common code for AP and FBW telemetry.
#define int32_rmat_of_eulers
Rotation matrix from Euler angles.
void imu_set_defaults_mag(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct FloatVect3 *scale_f)
Set the defaults for a mag sensor WARNING: Should be called before sensor is publishing messages to e...
Inertial Measurement Unit interface.
void mag_uavcan_init(void)
static uavcan_event mag_uavcan_ev
static struct FloatVect3 default_uavcan_mag_scale
static void mag_uavcan_cb(struct uavcan_iface_t *iface, CanardRxTransfer *transfer)
static uavcan_event mag_uavcan_ev2
static void mag_uavcan_cb2(struct uavcan_iface_t *iface, CanardRxTransfer *transfer)
void uavcan_bind(uint16_t data_type_id, uint64_t data_type_signature, uavcan_event *ev, uavcan_callback cb)
Bind to a receiving message from uavcan.
struct uavcan_event_t uavcan_event
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
int transfer(const Mat *from, const image_t *to)