Merge pull request #14 from Portagoras/patch-1

Correction
This commit is contained in:
Tobias Schürg 2020-07-05 05:44:59 +02:00 committed by GitHub
commit b14f103251
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,7 +243,7 @@ int MHZ::readCO2PWM() {
if (debug) Serial.print(".");
th = pulseIn(_pwmpin, HIGH, 1004000) / 1000;
tl = 1004 - th;
ppm_pwm = 5000 * (th - 2) / (th + tl - 4);
ppm_pwm = 2000 * (th - 2) / (th + tl - 4);
} while (th == 0);
if (debug) {
Serial.print(F("\n # PPM PWM: "));