Fix CLT based priming
There was error in calculation and also the coolant temp wasn't read at all, so I needed to add coolant temp reading too.
This commit is contained in:
parent
500d50ab2a
commit
483d44a9e6
|
@ -813,12 +813,13 @@ void initialiseAll()
|
|||
|
||||
interrupts();
|
||||
//Perform the priming pulses. Set these to run at an arbitrary time in the future (100us). The prime pulse value is in ms*10, so need to multiple by 100 to get to uS
|
||||
readCLT(); // need to read coolant temp to make priming pulsewidth work correctly.
|
||||
if((table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET)) > 0)
|
||||
{
|
||||
setFuelSchedule1(100, (unsigned long)(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 500)); //to acheive long enough priming pulses, the values in tuner studio are 0.5ms so those need to be multiplied by 500 to get uS value.
|
||||
setFuelSchedule2(100, (unsigned long)(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 500));
|
||||
setFuelSchedule3(100, (unsigned long)(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 500));
|
||||
setFuelSchedule4(100, (unsigned long)(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 500));
|
||||
setFuelSchedule1(100, (unsigned long)5*(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 100)); //to acheive long enough priming pulses, the values in tuner studio are divided by 0.5 instead of 0.1, so multiplier of 5 is required.
|
||||
setFuelSchedule2(100, (unsigned long)5*(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 100));
|
||||
setFuelSchedule3(100, (unsigned long)5*(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 100));
|
||||
setFuelSchedule4(100, (unsigned long)5*(table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET) * 100));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue