APM:Libraries
|
#include <AP_Compass_BMM150.h>
Public Member Functions | |
void | read () override |
Public Member Functions inherited from AP_Compass_Backend | |
AP_Compass_Backend (Compass &compass) | |
virtual | ~AP_Compass_Backend (void) |
virtual void | accumulate (void) |
virtual void | handle_mag_msg (Vector3f &mag) |
Static Public Member Functions | |
static AP_Compass_Backend * | probe (Compass &compass, AP_HAL::OwnPtr< AP_HAL::I2CDevice > dev) |
Static Public Attributes | |
static constexpr const char * | name = "BMM150" |
Private Member Functions | |
AP_Compass_BMM150 (Compass &compass, AP_HAL::OwnPtr< AP_HAL::Device > dev) | |
bool | init () |
void | _update () |
bool | _load_trim_values () |
int16_t | _compensate_xy (int16_t xy, uint32_t rhall, int32_t txy1, int32_t txy2) |
int16_t | _compensate_z (int16_t z, uint32_t rhall) |
Private Attributes | |
AP_HAL::OwnPtr< AP_HAL::Device > | _dev |
Vector3f | _mag_accum |
uint32_t | _accum_count |
uint8_t | _compass_instance |
struct { | |
int8_t x1 | |
int8_t y1 | |
int8_t x2 | |
int8_t y2 | |
uint16_t z1 | |
int16_t z2 | |
int16_t z3 | |
int16_t z4 | |
uint8_t xy1 | |
int8_t xy2 | |
uint16_t xyz1 | |
} | _dig |
uint32_t | _last_read_ms |
AP_HAL::Util::perf_counter_t | _perf_err |
Additional Inherited Members | |
Public Types inherited from AP_Compass_Backend | |
enum | DevTypes { DEVTYPE_HMC5883_OLD = 0x01, DEVTYPE_HMC5883 = 0x07, DEVTYPE_LSM303D = 0x02, DEVTYPE_AK8963 = 0x04, DEVTYPE_BMM150 = 0x05, DEVTYPE_LSM9DS1 = 0x06, DEVTYPE_LIS3MDL = 0x08, DEVTYPE_AK09916 = 0x09, DEVTYPE_IST8310 = 0x0A, DEVTYPE_ICM20948 = 0x0B, DEVTYPE_MMC3416 = 0x0C, DEVTYPE_QMC5883L = 0x0D, DEVTYPE_MAG3110 = 0x0E } |
Protected Member Functions inherited from AP_Compass_Backend | |
void | rotate_field (Vector3f &mag, uint8_t instance) |
void | publish_raw_field (const Vector3f &mag, uint8_t instance) |
void | correct_field (Vector3f &mag, uint8_t i) |
void | publish_filtered_field (const Vector3f &mag, uint8_t instance) |
void | set_last_update_usec (uint32_t last_update, uint8_t instance) |
uint8_t | register_compass (void) const |
void | set_dev_id (uint8_t instance, uint32_t dev_id) |
void | set_external (uint8_t instance, bool external) |
bool | is_external (uint8_t instance) |
void | set_rotation (uint8_t instance, enum Rotation rotation) |
bool | field_ok (const Vector3f &field) |
uint32_t | get_error_count () const |
Protected Attributes inherited from AP_Compass_Backend | |
Compass & | _compass |
AP_HAL::Semaphore * | _sem |
Definition at line 27 of file AP_Compass_BMM150.h.
|
private |
Definition at line 81 of file AP_Compass_BMM150.cpp.
Referenced by probe().
|
private |
Definition at line 247 of file AP_Compass_BMM150.cpp.
Referenced by _update().
|
private |
Definition at line 266 of file AP_Compass_BMM150.cpp.
Referenced by _update().
|
private |
Definition at line 88 of file AP_Compass_BMM150.cpp.
Referenced by init().
|
private |
Definition at line 287 of file AP_Compass_BMM150.cpp.
Referenced by init().
|
private |
Device periodic callback to read data from the sensor.
Definition at line 143 of file AP_Compass_BMM150.cpp.
Referenced by probe().
|
static |
Definition at line 66 of file AP_Compass_BMM150.cpp.
Referenced by Compass::_detect_backends().
|
overridevirtual |
Implements AP_Compass_Backend.
Definition at line 345 of file AP_Compass_BMM150.cpp.
|
private |
Definition at line 52 of file AP_Compass_BMM150.h.
|
private |
Definition at line 54 of file AP_Compass_BMM150.h.
|
private |
Definition at line 49 of file AP_Compass_BMM150.h.
Referenced by _load_trim_values(), _update(), and init().
struct { ... } AP_Compass_BMM150::_dig |
Referenced by _compensate_xy(), _compensate_z(), _load_trim_values(), and _update().
|
private |
Definition at line 70 of file AP_Compass_BMM150.h.
|
private |
Definition at line 51 of file AP_Compass_BMM150.h.
|
private |
Definition at line 71 of file AP_Compass_BMM150.h.
|
static |
Definition at line 35 of file AP_Compass_BMM150.h.
Referenced by Compass::_detect_backends().
int8_t AP_Compass_BMM150::x1 |
Definition at line 57 of file AP_Compass_BMM150.h.
Referenced by _update().
int8_t AP_Compass_BMM150::x2 |
Definition at line 59 of file AP_Compass_BMM150.h.
uint8_t AP_Compass_BMM150::xy1 |
Definition at line 65 of file AP_Compass_BMM150.h.
int8_t AP_Compass_BMM150::xy2 |
Definition at line 66 of file AP_Compass_BMM150.h.
uint16_t AP_Compass_BMM150::xyz1 |
Definition at line 67 of file AP_Compass_BMM150.h.
int8_t AP_Compass_BMM150::y1 |
Definition at line 58 of file AP_Compass_BMM150.h.
int8_t AP_Compass_BMM150::y2 |
Definition at line 60 of file AP_Compass_BMM150.h.
uint16_t AP_Compass_BMM150::z1 |
Definition at line 61 of file AP_Compass_BMM150.h.
int16_t AP_Compass_BMM150::z2 |
Definition at line 62 of file AP_Compass_BMM150.h.
int16_t AP_Compass_BMM150::z3 |
Definition at line 63 of file AP_Compass_BMM150.h.
int16_t AP_Compass_BMM150::z4 |
Definition at line 64 of file AP_Compass_BMM150.h.