Only perform the 2D table lookup for priming value once on startup
This commit is contained in:
parent
483d44a9e6
commit
6437516bf7
|
@ -814,12 +814,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)
|
||||
unsigned long primingValue = table2D_getValue(&PrimingPulseTable, currentStatus.coolant + CALIBRATION_TEMPERATURE_OFFSET);
|
||||
if(primingValue > 0)
|
||||
{
|
||||
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));
|
||||
setFuelSchedule1(100, (primingValue * 100 * 5)); //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, (primingValue * 100 * 5));
|
||||
setFuelSchedule3(100, (primingValue * 100 * 5));
|
||||
setFuelSchedule4(100, (primingValue * 100 * 5));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue