New calibration values for O2

This commit is contained in:
Josh Stewart 2014-12-23 18:05:52 +11:00
parent ba6428c5f8
commit 72ec1179b0
1 changed files with 2 additions and 2 deletions

View File

@ -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);