diff --git a/speeduino/init.ino b/speeduino/init.ino index 8a77b4ef..091407ba 100644 --- a/speeduino/init.ino +++ b/speeduino/init.ino @@ -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)); }