mirror of https://github.com/rusefi/speeduino.git
New calibration values for O2
This commit is contained in:
parent
ba6428c5f8
commit
72ec1179b0
|
@ -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.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 = 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.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
|
//The IAT and CLT readings can be done less frequently. This still runs about 10 times per second
|
||||||
if ((mainLoopCount & 127) == 1)
|
if ((mainLoopCount & 127) == 1)
|
||||||
{
|
{
|
||||||
|
@ -254,7 +254,7 @@ void loop()
|
||||||
if (currentStatus.hasSync && (currentStatus.RPM > 0))
|
if (currentStatus.hasSync && (currentStatus.RPM > 0))
|
||||||
{
|
{
|
||||||
//If it is, check is we're running or cranking
|
//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
|
{ //Sets the engine running bit, clears the engine cranking bit
|
||||||
BIT_SET(currentStatus.engine, BIT_ENGINE_RUN);
|
BIT_SET(currentStatus.engine, BIT_ENGINE_RUN);
|
||||||
BIT_CLEAR(currentStatus.engine, BIT_ENGINE_CRANK);
|
BIT_CLEAR(currentStatus.engine, BIT_ENGINE_CRANK);
|
||||||
|
|
Loading…
Reference in New Issue