NinjaFlight
|
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <platform.h>
#include "build_config.h"
#include "common/maths.h"
#include "drivers/barometer.h"
#include "drivers/system.h"
#include "config/config.h"
#include "sensors/barometer.h"
Macros | |
#define | CALIBRATING_BARO_CYCLES 200 |
#define | PRESSURE_SAMPLES_MEDIAN 3 |
#define | PRESSURE_SAMPLE_COUNT (config_get_profile(self->config)->baro.baro_sample_count - 1) |
Enumerations | |
enum | barometerState_e { BAROMETER_NEEDS_SAMPLES = 0, BAROMETER_NEEDS_CALCULATION } |
Functions | |
bool | isBaroCalibrationComplete (void) |
void | baroSetCalibrationCycles (uint16_t calibrationCyclesRequired) |
void | baro_init (struct baro *self, const struct config *config) |
bool | isBaroReady (void) |
uint32_t | baro_update (struct baro *self) |
int32_t | baro_calc_altitude (struct baro *self) |
void | performBaroCalibrationCycle (struct baro *self) |
Variables | |
baro_t | baro |
uint16_t | calibratingB = 0 |
uint32_t | baroPressure = 0 |
int32_t | baroTemperature = 0 |
int32_t | BaroAlt = 0 |
#define CALIBRATING_BARO_CYCLES 200 |
#define PRESSURE_SAMPLE_COUNT (config_get_profile(self->config)->baro.baro_sample_count - 1) |
#define PRESSURE_SAMPLES_MEDIAN 3 |
enum barometerState_e |
int32_t baro_calc_altitude | ( | struct baro * | self | ) |
uint32_t baro_update | ( | struct baro * | self | ) |
void baroSetCalibrationCycles | ( | uint16_t | calibrationCyclesRequired | ) |
bool isBaroCalibrationComplete | ( | void | ) |
bool isBaroReady | ( | void | ) |
void performBaroCalibrationCycle | ( | struct baro * | self | ) |
int32_t BaroAlt = 0 |
uint32_t baroPressure = 0 |
int32_t baroTemperature = 0 |
uint16_t calibratingB = 0 |