36#ifndef __INCLUDE_SENSING_BAROMETER_H
37#define __INCLUDE_SENSING_BAROMETER_H
48#include <sdk/config.h>
51#include <nuttx/sensors/bmp280.h>
53#include "sensing/sensor_api.h"
54#include "sensing/sensor_id.h"
55#include "memutils/s_stl/queue.h"
61#define BAROMETER_PRESSURE_SAMPLING_FREQUENCY 8
62#define BAROMETER_PRESSURE_WATERMARK_NUM 40
63#define BAROMETER_TEMPERATURE_SAMPLING_FREQUENCY 8
64#define BAROMETER_TEMPERATURE_WATERMARK_NUM 40
66#define PRESSURE_SAMPLING_FREQUENCY BAROMETER_PRESSURE_SAMPLING_FREQUENCY
67#define PRESSURE_WATERMARK_NUM BAROMETER_PRESSURE_WATERMARK_NUM
69#define TEMPERATURE_SAMPLING_FREQUENCY BAROMETER_TEMPERATURE_SAMPLING_FREQUENCY
70#define TEMPERATURE_WATERMARK_NUM BAROMETER_TEMPERATURE_WATERMARK_NUM
110 void setAdjustParam(
struct bmp280_press_adj_s* param);
111 void setAdjustParam(
struct bmp280_temp_adj_s* param);
114 : m_id(
id), isReceivedPressureData(
false), isReceivedTemperatureData(
false)
126 struct bmp280_press_adj_s press_adj;
127 struct bmp280_temp_adj_s temp_adj;
129 bool isReceivedPressureData;
130 bool isReceivedTemperatureData;
134 void compemsate(
void);
135 uint32_t compensatePressure(int32_t adc_P, int32_t comp_T);
136 int32_t compensateTemperature(int32_t adc_T);
Definition: barometer.h:101
Memory Handler Class for "Memory Manager Lite". This is only wrapper class for convert project-specif...
Definition: MemManager.h:107
int BarometerClose(BarometerClass *ins)
Close BarometerClass.
int BarometerWrite(BarometerClass *ins, sensor_command_data_mh_t *command)
Send data to BarometerClass.
void BarometerSetTemperatureAdjustParam(struct bmp280_temp_adj_s *param)
Set sensor predefined adjustment values for temperature.
int BarometerStart(BarometerClass *ins)
Start Barometer.
BarometerClass * BarometerCreate(void)
Create BarometerClass instance.
#define BAROMETER_PRESSURE_WATERMARK_NUM
Definition: barometer.h:62
void BarometerSetPressureAdjustParam(struct bmp280_press_adj_s *param)
Set sensor predefined adjustment values for pressure.
int BarometerOpen(BarometerClass *ins)
Open BarometerClass.
int BarometerStop(BarometerClass *ins)
Stop Barometer.
#define BAROMETER_TEMPERATURE_WATERMARK_NUM
Definition: barometer.h:64
Input pressure data to DSP.
Definition: barometer.h:92
Input temperature data to DSP.
Definition: barometer.h:82
The command of send some sensor data with MemHandle to the sensor manager. This function only can cal...
Definition: sensor_api.h:134