Added unit tests! to validate library calculations

This commit is contained in:
miguel5612
2022-03-21 14:32:37 -05:00
parent 6a035cc5d0
commit e3f5e2ec0c
5 changed files with 301 additions and 8 deletions

View File

@ -31,7 +31,7 @@ class MQUnifiedsensor
//user functions
float calibrate(float ratioInCleanAir);
float readSensor(bool isMQ303A = false, float correctionFactor = 0.0);
float readSensor(bool isMQ303A = false, float correctionFactor = 0.0, bool injected=false);
float readSensorR0Rs();
float validateEcuation(float ratioInput = 0);
@ -42,9 +42,12 @@ class MQUnifiedsensor
float getRL();
float getVoltResolution();
String getRegressionMethod();
float getVoltage(int read = true);
float stringTofloat(String & str);
float getVoltage(bool read = true, bool injected = false, int value = 0);
float stringTofloat(String & str);
// functions for testing
float getRS();
float setRsR0RatioGetPPM(float value);
private:
/************************Private vars************************************/