Cleanup general definitions in MQUnifiedSensor.h

ADC_RESOLUTION is unused, and retries and retry_interval are only used by getVoltage().
Thus, remove ADC_RESOLUTION and move retries and retry_interval to MQUnifiedsensor.cpp.
Furthermore, these three definitions have generic names so it's easy to have them
conflict with a user's sketch that imports MQUnifiedSensor.h.
This commit is contained in:
Adriano Cunha 2023-04-03 08:53:13 -07:00
parent a7e89570fd
commit b6bff185f3
2 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,8 @@
#include "MQUnifiedsensor.h" #include "MQUnifiedsensor.h"
#define retries 2
#define retry_interval 20
MQUnifiedsensor::MQUnifiedsensor(String Placa, float Voltage_Resolution, int ADC_Bit_Resolution, int pin, String type) { MQUnifiedsensor::MQUnifiedsensor(String Placa, float Voltage_Resolution, int ADC_Bit_Resolution, int pin, String type) {
this->_pin = pin; this->_pin = pin;
Placa.toCharArray(this->_placa, 20); Placa.toCharArray(this->_placa, 20);

View File

@ -6,10 +6,6 @@
/***********************Software Related Macros************************************/ /***********************Software Related Macros************************************/
#define ADC_RESOLUTION 10 // for 10bit analog to digital converter.
#define retries 2
#define retry_interval 20
class MQUnifiedsensor class MQUnifiedsensor
{ {
public: public: