From 72ec1179b02ced02ed0a0c6ea2c7101f7d9e5e42 Mon Sep 17 00:00:00 2001 From: Josh Stewart Date: Tue, 23 Dec 2014 18:05:52 +1100 Subject: [PATCH] New calibration values for O2 --- speeduino.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speeduino.ino b/speeduino.ino index f4f878e..bd18941 100644 --- a/speeduino.ino +++ b/speeduino.ino @@ -236,7 +236,7 @@ void loop() currentStatus.tpsADC = map(analogRead(pinTPS), 0, 1023, 0, 255); //Get the current raw TPS ADC value and map it into a byte currentStatus.TPS = map(currentStatus.tpsADC, configPage1.tpsMin, configPage1.tpsMax, 0, 100); //Take the raw TPS ADC value and convert it into a TPS% based on the calibrated values //currentStatus.TPS = 70; - currentStatus.O2 = map(analogRead(pinO2), 0, 1023, 117, 358); //Get the current O2 value. Calibration is from AFR values 7.35 to 22.4, then multiplied by 16 (<< 4). This is the correct calibration for an Innovate Wideband 0v - 5V unit + currentStatus.O2 = map(analogRead(pinO2), 0, 1023, 74, 224); //Get the current O2 value. Calibration is from AFR values 7.35 to 22.4, then multiplied by 16 (<< 4). This is the correct calibration for an Innovate Wideband 0v - 5V unit //The IAT and CLT readings can be done less frequently. This still runs about 10 times per second if ((mainLoopCount & 127) == 1) { @@ -254,7 +254,7 @@ void loop() if (currentStatus.hasSync && (currentStatus.RPM > 0)) { //If it is, check is we're running or cranking - if(currentStatus.RPM > configPage2.crankRPM) + if(currentStatus.RPM > int(configPage2.crankRPM * 100)) //Crank RPM stored in byte as RPM / 100 { //Sets the engine running bit, clears the engine cranking bit BIT_SET(currentStatus.engine, BIT_ENGINE_RUN); BIT_CLEAR(currentStatus.engine, BIT_ENGINE_CRANK);