NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
compass.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <platform.h>
#include "build_config.h"
#include "common/axis.h"
#include "sensors/boardalignment.h"
#include "config/config.h"
#include "sensors/compass.h"
Include dependency graph for compass.c:

Macros

#define MAG_CALIBRATION_SAMPLES   240
 

Functions

void ins_mag_init (struct ins_mag *self, const struct mag_config *config, const struct sensor_trims_config *trims)
 
void ins_mag_start_calibration (struct ins_mag *self)
 
void ins_mag_save_trims (const struct ins_mag *self, struct config *config)
 
void ins_mag_process_sample (struct ins_mag *self, int32_t x, int32_t y, int32_t z)
 

Macro Definition Documentation

#define MAG_CALIBRATION_SAMPLES   240

Function Documentation

void ins_mag_init ( struct ins_mag self,
const struct mag_config config,
const struct sensor_trims_config trims 
)
void ins_mag_process_sample ( struct ins_mag self,
int32_t  x,
int32_t  y,
int32_t  z 
)
void ins_mag_save_trims ( const struct ins_mag self,
struct config config 
)
void ins_mag_start_calibration ( struct ins_mag self)