Updated method name

This commit is contained in:
miguel5612 2020-03-26 10:12:04 -05:00
parent 7cec5bbb77
commit a03ceab3dc
2 changed files with 4 additions and 2 deletions

View File

@ -53,7 +53,7 @@ void MQUnifiedsensor::setVoltResolution(float voltaje)
{ {
_VOLT_RESOLUTION = voltaje; _VOLT_RESOLUTION = voltaje;
} }
void MQUnifiedsensor::inicializar() void MQUnifiedsensor::init()
{ {
pinMode(_pin, INPUT); pinMode(_pin, INPUT);
} }

View File

@ -16,7 +16,7 @@ class MQUnifiedsensor
MQUnifiedsensor(String Placa = "Arduino", int Voltage_Resolution = 5, int pin, String type); MQUnifiedsensor(String Placa = "Arduino", int Voltage_Resolution = 5, int pin, String type);
//Functions to set values //Functions to set values
void inicializar(); void init();
void update(); void update();
void setR0(double R0 = 10); void setR0(double R0 = 10);
void setRL(double RL = 10); void setRL(double RL = 10);
@ -37,11 +37,13 @@ class MQUnifiedsensor
private: private:
/************************Private vars************************************/ /************************Private vars************************************/
byte _pin; byte _pin;
byte _firstFlag = false;
String _type; String _type;
String _placa; String _placa;
byte _VOLT_RESOLUTION = 5.0; // if 3.3v use 3.3 byte _VOLT_RESOLUTION = 5.0; // if 3.3v use 3.3
byte _ratioInCleanAir, _sensor_volt; byte _ratioInCleanAir, _sensor_volt;
byte _RLValue = 10; //Value in KiloOhms byte _RLValue = 10; //Value in KiloOhms
double _adc;
float _R0, RS_air, _ratio, _PPM, _RS_Calc; float _R0, RS_air, _ratio, _PPM, _RS_Calc;
}; };