Experimental temperature fix
This commit is contained in:
parent
45e4cb6466
commit
2f94559101
|
@ -357,6 +357,7 @@ void receiveCalibration(byte tableID)
|
|||
tempBuffer[1] = Serial.read();
|
||||
|
||||
tempValue = div(int(word(tempBuffer[0], tempBuffer[1])), DIVISION_FACTOR).quot; //Read 2 bytes, convert to word (an unsigned int), convert to signed int. These values come through * 10 from Tuner Studio
|
||||
tempValue = ((tempValue - 32) * 5) / 9; //Convert from F to C
|
||||
}
|
||||
tempValue = tempValue + OFFSET;
|
||||
|
||||
|
|
|
@ -263,9 +263,9 @@ void loop()
|
|||
//The IAT and CLT readings can be done less frequently. This still runs about 10 times per second
|
||||
if ((mainLoopCount & 127) == 1)
|
||||
{
|
||||
currentStatus.cltADC = map(analogRead(pinCLT), 0, 1023, 0, 512); //Get the current raw CLT value
|
||||
currentStatus.iatADC = map(analogRead(pinIAT), 0, 1023, 0, 512); //Get the current raw IAT value
|
||||
currentStatus.O2ADC = map(analogRead(pinO2), 0, 1023, 0, 512); //Get the current O2 value. Calibration is from AFR values 7.35 to 22.4. This is the correct calibration for an Innovate Wideband 0v - 5V unit. Proper calibration is still a WIP
|
||||
currentStatus.cltADC = map(analogRead(pinCLT), 0, 1023, 0, 511); //Get the current raw CLT value
|
||||
currentStatus.iatADC = map(analogRead(pinIAT), 0, 1023, 0, 511); //Get the current raw IAT value
|
||||
currentStatus.O2ADC = map(analogRead(pinO2), 0, 1023, 0, 511); //Get the current O2 value. Calibration is from AFR values 7.35 to 22.4. This is the correct calibration for an Innovate Wideband 0v - 5V unit. Proper calibration is still a WIP
|
||||
currentStatus.battery10 = map(analogRead(pinBat), 0, 1023, 0, 245); //Get the current raw Battery value. Permissible values are from 0v to 24.5v (245)
|
||||
//currentStatus.batADC = map(analogRead(pinBat), 0, 1023, 0, 255); //Get the current raw Battery value
|
||||
|
||||
|
|
Loading…
Reference in New Issue