PX4 Firmware
PX4 Autopilot Software http://px4.io
DfAK8963Wrapper Class Reference
Inheritance diagram for DfAK8963Wrapper:
Collaboration diagram for DfAK8963Wrapper:

Classes

struct  mag_calibration_s
 

Public Member Functions

 DfAK8963Wrapper (enum Rotation rotation)
 
 ~DfAK8963Wrapper ()
 
int start ()
 Start automatic measurement. More...
 
int stop ()
 Stop automatic measurement. More...
 
void print_calibration ()
 

Private Member Functions

int _publish (struct mag_sensor_data &data)
 
void _update_mag_calibration ()
 

Private Attributes

orb_advert_t _mag_topic
 
int _param_update_sub
 
struct DfAK8963Wrapper::mag_calibration_s _mag_calibration
 
matrix::Dcmf _rotation_matrix
 
int _mag_orb_class_instance
 
perf_counter_t _mag_sample_perf
 

Detailed Description

Definition at line 73 of file df_ak8963_wrapper.cpp.

Constructor & Destructor Documentation

◆ DfAK8963Wrapper()

DfAK8963Wrapper::DfAK8963Wrapper ( enum Rotation  rotation)

Definition at line 122 of file df_ak8963_wrapper.cpp.

References _mag_calibration, _mag_orb_class_instance, _mag_sample_perf, _rotation_matrix, get_rot_matrix(), PC_ELAPSED, perf_alloc, DfAK8963Wrapper::mag_calibration_s::x_offset, DfAK8963Wrapper::mag_calibration_s::x_scale, DfAK8963Wrapper::mag_calibration_s::y_offset, DfAK8963Wrapper::mag_calibration_s::y_scale, DfAK8963Wrapper::mag_calibration_s::z_offset, and DfAK8963Wrapper::mag_calibration_s::z_scale.

Referenced by df_ak8963_wrapper::start().

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

◆ ~DfAK8963Wrapper()

DfAK8963Wrapper::~DfAK8963Wrapper ( )

Definition at line 142 of file df_ak8963_wrapper.cpp.

References _mag_sample_perf, and perf_free().

Here is the call graph for this function:

Member Function Documentation

◆ _publish()

◆ _update_mag_calibration()

void DfAK8963Wrapper::_update_mag_calibration ( )
private

Definition at line 188 of file df_ak8963_wrapper.cpp.

References _mag_calibration, device_id, OK, param_find(), param_get(), DfAK8963Wrapper::mag_calibration_s::x_offset, DfAK8963Wrapper::mag_calibration_s::x_scale, DfAK8963Wrapper::mag_calibration_s::y_offset, DfAK8963Wrapper::mag_calibration_s::y_scale, DfAK8963Wrapper::mag_calibration_s::z_offset, and DfAK8963Wrapper::mag_calibration_s::z_scale.

Referenced by _publish(), and start().

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

◆ print_calibration()

void DfAK8963Wrapper::print_calibration ( )

Definition at line 253 of file df_ak8963_wrapper.cpp.

References _mag_calibration, DfAK8963Wrapper::mag_calibration_s::x_offset, DfAK8963Wrapper::mag_calibration_s::x_scale, DfAK8963Wrapper::mag_calibration_s::y_offset, DfAK8963Wrapper::mag_calibration_s::y_scale, DfAK8963Wrapper::mag_calibration_s::z_offset, and DfAK8963Wrapper::mag_calibration_s::z_scale.

Referenced by df_ak8963_wrapper::info().

Here is the caller graph for this function:

◆ start()

int DfAK8963Wrapper::start ( )

Start automatic measurement.

Returns
0 on success

Definition at line 147 of file df_ak8963_wrapper.cpp.

References _param_update_sub, _update_mag_calibration(), ToneAlarmInterface::init(), ORB_ID, orb_subscribe(), and start().

Referenced by df_ak8963_wrapper::start().

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

◆ stop()

int DfAK8963Wrapper::stop ( )

Stop automatic measurement.

Returns
0 on success

Definition at line 175 of file df_ak8963_wrapper.cpp.

References stop().

Referenced by df_ak8963_wrapper::stop().

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

Member Data Documentation

◆ _mag_calibration

struct DfAK8963Wrapper::mag_calibration_s DfAK8963Wrapper::_mag_calibration
private

◆ _mag_orb_class_instance

int DfAK8963Wrapper::_mag_orb_class_instance
private

Definition at line 116 of file df_ak8963_wrapper.cpp.

Referenced by _publish(), and DfAK8963Wrapper().

◆ _mag_sample_perf

perf_counter_t DfAK8963Wrapper::_mag_sample_perf
private

Definition at line 118 of file df_ak8963_wrapper.cpp.

Referenced by _publish(), DfAK8963Wrapper(), and ~DfAK8963Wrapper().

◆ _mag_topic

orb_advert_t DfAK8963Wrapper::_mag_topic
private

Definition at line 101 of file df_ak8963_wrapper.cpp.

Referenced by _publish().

◆ _param_update_sub

int DfAK8963Wrapper::_param_update_sub
private

Definition at line 103 of file df_ak8963_wrapper.cpp.

Referenced by _publish(), and start().

◆ _rotation_matrix

matrix::Dcmf DfAK8963Wrapper::_rotation_matrix
private

Definition at line 114 of file df_ak8963_wrapper.cpp.

Referenced by _publish(), and DfAK8963Wrapper().


The documentation for this class was generated from the following file: