41 lines
686 B
C++
41 lines
686 B
C++
/// © MiroZ 2024
|
|
|
|
#ifndef __SENSORS_H__
|
|
#define __SENSORS_H__
|
|
|
|
#include <stdint.h>
|
|
#include <esp_log.h>
|
|
#include <Wire.h>
|
|
|
|
#include "Bme68x.h"
|
|
#include "Bmp280.h"
|
|
#include "LD2410.h"
|
|
|
|
#include "../AppIF.h"
|
|
|
|
class SensorService
|
|
{
|
|
protected:
|
|
TaskHandle_t m_i2c1_task = nullptr;
|
|
TaskHandle_t m_i2c2_task = nullptr;
|
|
|
|
void run_i2c_1();
|
|
void run_uart();
|
|
|
|
Bmp280 * m_bmp280 = nullptr;
|
|
Bme68x * m_bme68x = nullptr;
|
|
LD2410 * m_ld2410 = nullptr;
|
|
|
|
AppIF & m_app_if;
|
|
|
|
void postBme68xData(float pressure, float temp);
|
|
void processLight(int light_value);
|
|
void processHumidity(float humidity);
|
|
uint16_t m_light_value = 0;
|
|
|
|
public:
|
|
SensorService(AppIF & app_if);
|
|
void start();
|
|
};
|
|
|
|
#endif |