mirror of
https://github.com/miguel5612/MQSensorsLib.git
synced 2025-06-07 22:30:13 +03:00
Add voltage resolution unit test for MQ303A
This commit is contained in:
parent
c927504bf5
commit
14b0f908f3
@ -246,6 +246,15 @@ test(MQ303A_Ethanol)
|
||||
assertEqual(PPM,ppmExp);
|
||||
}
|
||||
|
||||
test(MQ303A_VoltResolution)
|
||||
{
|
||||
float vRes = 4.7;
|
||||
MQ303A.setVoltResolution(vRes);
|
||||
MQ303A.setADC(100); // provide dummy ADC value
|
||||
MQ303A.readSensor(true); // dummy read for MQ303A
|
||||
assertEqualFloat(MQ303A.getVoltResolution(), vRes);
|
||||
}
|
||||
|
||||
test(MQ309A_CO)
|
||||
{
|
||||
MQ309A.setRegressionMethod(1); //_PPM = a*ratio^b
|
||||
|
Loading…
x
Reference in New Issue
Block a user