|
Sensor Fusion Library 0.6.1
Orientation sensing for Espressif (ESP32, ESP8266) processors
|
Provides functions to store calibration to NVM. More...
#include <stdio.h>#include <EEPROM.h>#include "sensor_fusion.h"#include "calibration_storage.h"#include "debug_print.h"
Go to the source code of this file.
Macros | |
| #define | CALIBRATION_STORAGE_SIZE_BYTES 256 |
| #define | CALIBRATION_BUF_MAGNETIC_START 0 |
| #define | CALIBRATION_BUF_MAGNETIC_HDR_SIZE 4 |
| #define | CALIBRATION_BUF_MAGNETIC_HDR_MAGIC 0x12345678 |
| #define | CALIBRATION_BUF_MAGNETIC_VAL_SIZE 64 |
| #define | CALIBRATION_BUF_MAGNETIC_TOT_SIZE (CALIBRATION_BUF_MAGNETIC_HDR_SIZE + CALIBRATION_BUF_MAGNETIC_VAL_SIZE) |
| #define | CALIBRATION_BUF_GYRO_START (CALIBRATION_BUF_MAGNETIC_TOT_SIZE) |
| #define | CALIBRATION_BUF_GYRO_HDR_SIZE 4 |
| #define | CALIBRATION_BUF_GYRO_HDR_MAGIC 0x12345678 |
| #define | CALIBRATION_BUF_GYRO_VAL_SIZE 12 |
| #define | CALIBRATION_BUF_GYRO_TOT_SIZE (CALIBRATION_BUF_GYRO_HDR_SIZE + CALIBRATION_BUF_GYRO_VAL_SIZE) |
| #define | CALIBRATION_BUF_ACCEL_START (CALIBRATION_BUF_MAGNETIC_TOT_SIZE + CALIBRATION_BUF_GYRO_TOT_SIZE) |
| #define | CALIBRATION_BUF_ACCEL_HDR_SIZE 4 |
| #define | CALIBRATION_BUF_ACCEL_HDR_MAGIC 0x12345678 |
| #define | CALIBRATION_BUF_ACCEL_VAL_SIZE 84 |
| #define | CALIBRATION_BUF_ACCEL_TOT_SIZE (CALIBRATION_BUF_ACCEL_HDR_SIZE + CALIBRATION_BUF_ACCEL_VAL_SIZE) |
| #define | CALIBRATION_NO_MAGIC 0xdeadbeef |
Functions | |
| bool | GetMagCalibrationFromNVM (float *cal_values) |
| bool | GetGyroCalibrationFromNVM (float *cal_values) |
| bool | GetAccelCalibrationFromNVM (float *cal_values) |
| void | SaveMagCalibrationToNVM (SensorFusionGlobals *sfg) |
| void | SaveGyroCalibrationToNVM (SensorFusionGlobals *sfg) |
| void | SaveAccelCalibrationToNVM (SensorFusionGlobals *sfg) |
| void | EraseMagCalibrationFromNVM (void) |
| void | EraseGyroCalibrationFromNVM (void) |
| void | EraseAccelCalibrationFromNVM (void) |
Provides functions to store calibration to NVM.
Written for use on Arduino-Espressif environment where EEPROM library available.
Definition in file calibration_storage.cc.
| #define CALIBRATION_BUF_ACCEL_HDR_MAGIC 0x12345678 |
Definition at line 36 of file calibration_storage.cc.
| #define CALIBRATION_BUF_ACCEL_HDR_SIZE 4 |
Definition at line 35 of file calibration_storage.cc.
| #define CALIBRATION_BUF_ACCEL_START (CALIBRATION_BUF_MAGNETIC_TOT_SIZE + CALIBRATION_BUF_GYRO_TOT_SIZE) |
Definition at line 34 of file calibration_storage.cc.
| #define CALIBRATION_BUF_ACCEL_TOT_SIZE (CALIBRATION_BUF_ACCEL_HDR_SIZE + CALIBRATION_BUF_ACCEL_VAL_SIZE) |
Definition at line 38 of file calibration_storage.cc.
| #define CALIBRATION_BUF_ACCEL_VAL_SIZE 84 |
Definition at line 37 of file calibration_storage.cc.
| #define CALIBRATION_BUF_GYRO_HDR_MAGIC 0x12345678 |
Definition at line 31 of file calibration_storage.cc.
| #define CALIBRATION_BUF_GYRO_HDR_SIZE 4 |
Definition at line 30 of file calibration_storage.cc.
| #define CALIBRATION_BUF_GYRO_START (CALIBRATION_BUF_MAGNETIC_TOT_SIZE) |
Definition at line 29 of file calibration_storage.cc.
| #define CALIBRATION_BUF_GYRO_TOT_SIZE (CALIBRATION_BUF_GYRO_HDR_SIZE + CALIBRATION_BUF_GYRO_VAL_SIZE) |
Definition at line 33 of file calibration_storage.cc.
| #define CALIBRATION_BUF_GYRO_VAL_SIZE 12 |
Definition at line 32 of file calibration_storage.cc.
| #define CALIBRATION_BUF_MAGNETIC_HDR_MAGIC 0x12345678 |
Definition at line 26 of file calibration_storage.cc.
| #define CALIBRATION_BUF_MAGNETIC_HDR_SIZE 4 |
Definition at line 25 of file calibration_storage.cc.
| #define CALIBRATION_BUF_MAGNETIC_START 0 |
Definition at line 24 of file calibration_storage.cc.
| #define CALIBRATION_BUF_MAGNETIC_TOT_SIZE (CALIBRATION_BUF_MAGNETIC_HDR_SIZE + CALIBRATION_BUF_MAGNETIC_VAL_SIZE) |
Definition at line 28 of file calibration_storage.cc.
| #define CALIBRATION_BUF_MAGNETIC_VAL_SIZE 64 |
Definition at line 27 of file calibration_storage.cc.
| #define CALIBRATION_NO_MAGIC 0xdeadbeef |
Definition at line 39 of file calibration_storage.cc.
| #define CALIBRATION_STORAGE_SIZE_BYTES 256 |
Definition at line 23 of file calibration_storage.cc.
| void EraseAccelCalibrationFromNVM | ( | void | ) |
Definition at line 364 of file calibration_storage.cc.
| void EraseGyroCalibrationFromNVM | ( | void | ) |
Definition at line 337 of file calibration_storage.cc.
| void EraseMagCalibrationFromNVM | ( | void | ) |
Definition at line 310 of file calibration_storage.cc.
| bool GetAccelCalibrationFromNVM | ( | float * | cal_values | ) |
Definition at line 145 of file calibration_storage.cc.
| bool GetGyroCalibrationFromNVM | ( | float * | cal_values | ) |
Definition at line 103 of file calibration_storage.cc.
| bool GetMagCalibrationFromNVM | ( | float * | cal_values | ) |
Definition at line 59 of file calibration_storage.cc.
| void SaveAccelCalibrationToNVM | ( | SensorFusionGlobals * | sfg | ) |
Definition at line 272 of file calibration_storage.cc.
| void SaveGyroCalibrationToNVM | ( | SensorFusionGlobals * | sfg | ) |
Definition at line 229 of file calibration_storage.cc.
| void SaveMagCalibrationToNVM | ( | SensorFusionGlobals * | sfg | ) |
Definition at line 191 of file calibration_storage.cc.