Potential fix for injector priming running multiple times
This commit is contained in:
parent
b690de934c
commit
fd52de49d6
|
@ -101,6 +101,9 @@
|
|||
#elif defined(__SAMD21G18A__)
|
||||
#define BOARD_H "board_samd21.h"
|
||||
#define CORE_SAMD21
|
||||
#elif defined(__SAMC21J18A__)
|
||||
#define BOARD_H "board_samc21.h"
|
||||
#define CORE_SAMC21
|
||||
#else
|
||||
#error Incorrect board selected. Please select the correct board (Usually Mega 2560) and upload again
|
||||
#endif
|
||||
|
@ -498,6 +501,7 @@ extern bool previousClutchTrigger;
|
|||
extern volatile uint32_t toothHistory[TOOTH_LOG_BUFFER];
|
||||
extern volatile uint8_t compositeLogHistory[TOOTH_LOG_BUFFER];
|
||||
extern volatile bool fpPrimed; //Tracks whether or not the fuel pump priming has been completed yet
|
||||
extern volatile bool injPrimed; //Tracks whether or not the injector priming has been completed yet
|
||||
extern volatile unsigned int toothHistoryIndex;
|
||||
extern volatile byte toothHistorySerialIndex;
|
||||
extern unsigned long currentLoopTime; /**< The time (in uS) that the current mainloop started */
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
void initialiseAll()
|
||||
{
|
||||
fpPrimed = false;
|
||||
injPrimed = false;
|
||||
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
|
@ -372,6 +373,7 @@ void initialiseAll()
|
|||
BIT_CLEAR(currentStatus.status3, BIT_STATUS3_HALFSYNC);
|
||||
currentStatus.runSecs = 0;
|
||||
currentStatus.secl = 0;
|
||||
//currentStatus.seclx10 = 0;
|
||||
currentStatus.startRevolutions = 0;
|
||||
currentStatus.syncLossCounter = 0;
|
||||
currentStatus.flatShiftingHard = false;
|
||||
|
|
|
@ -96,6 +96,7 @@ void oneMSInterval() //Most ARM chips can simply call a function
|
|||
tachoOutputFlag = DEACTIVE;
|
||||
}
|
||||
}
|
||||
// Tacho sweep
|
||||
|
||||
|
||||
|
||||
|
@ -125,7 +126,7 @@ void oneMSInterval() //Most ARM chips can simply call a function
|
|||
if ( BIT_CHECK(currentStatus.engine, BIT_ENGINE_RUN) ) { runSecsX10++; }
|
||||
else { runSecsX10 = 0; }
|
||||
|
||||
if ( (seclx10 == configPage2.primingDelay) && (currentStatus.RPM == 0) ) { beginInjectorPriming(); }
|
||||
if ( (injPrimed == false) && (seclx10 == configPage2.primingDelay) && (currentStatus.RPM == 0) ) { beginInjectorPriming(); injPrimed = true; }
|
||||
seclx10++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue