44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
|
#ifndef SENSOR_MULTICHANNELGASGMXXX_H
|
||
|
#define SENSOR_MULTICHANNELGASGMXXX_H
|
||
|
|
||
|
#include "sensordata.h"
|
||
|
#include <Homie.h>
|
||
|
|
||
|
#include <Multichannel_Gas_GMXXX.h>
|
||
|
#include <Wire.h>
|
||
|
|
||
|
|
||
|
class Sensor_MULTICHANNELGASGMXXX
|
||
|
{
|
||
|
|
||
|
private:
|
||
|
GAS_GMXXX<TwoWire> *gas;
|
||
|
HomieNode *sensorNode; //reference to HomieNode
|
||
|
|
||
|
struct sensordata data_no2; //struct values are changed in setup()
|
||
|
struct sensordata data_c2h5oh;
|
||
|
struct sensordata data_voc;
|
||
|
struct sensordata data_co;
|
||
|
|
||
|
|
||
|
bool init_ok;
|
||
|
|
||
|
public:
|
||
|
Sensor_MULTICHANNELGASGMXXX();
|
||
|
|
||
|
void init();
|
||
|
void setSettings_no2(float minchange, unsigned long senddelaymax, unsigned long readdelay);
|
||
|
void setSettings_c2h5oh(float minchange, unsigned long senddelaymax, unsigned long readdelay);
|
||
|
void setSettings_voc(float minchange, unsigned long senddelaymax, unsigned long readdelay);
|
||
|
void setSettings_co(float minchange, unsigned long senddelaymax, unsigned long readdelay);
|
||
|
void advertise(HomieNode& p_sensorNode);
|
||
|
void sensorloop_no2();
|
||
|
void sensorloop_c2h5oh();
|
||
|
void sensorloop_voc();
|
||
|
void sensorloop_co();
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
|