read_nh3 and read_oxidising now call the correct get_raw_* functions

This commit is contained in:
Pete Favelle 2022-06-21 15:34:52 +01:00
parent 8638e42b7e
commit 80012790ce
1 changed files with 3 additions and 3 deletions

View File

@ -135,7 +135,7 @@ namespace pimoroni {
float BreakoutMICS6814::read_nh3(uint32_t adc_timeout) {
float vref = ioe.get_adc_vref();
float nh3 = get_raw_red(adc_timeout);
float nh3 = get_raw_nh3(adc_timeout);
if((nh3 != -1) && (vref != nh3))
nh3 = (nh3 * 56000.0f) / (vref - nh3);
else
@ -147,7 +147,7 @@ namespace pimoroni {
float BreakoutMICS6814::read_oxidising(uint32_t adc_timeout) {
float vref = ioe.get_adc_vref();
float oxd = get_raw_red(adc_timeout);
float oxd = get_raw_oxd(adc_timeout);
if((oxd != -1) && (vref != oxd))
oxd = (oxd * 56000.0f) / (vref - oxd);
else
@ -155,4 +155,4 @@ namespace pimoroni {
return oxd;
}
}
}