auto-sync
This commit is contained in:
parent
fb131888bf
commit
0232c7cffe
|
@ -54,6 +54,8 @@ public:
|
|||
*/
|
||||
bool isCylinderCleanupMode;
|
||||
|
||||
uint32_t ignitionMathTime;
|
||||
|
||||
|
||||
void updateSlowSensors();
|
||||
void watchdog();
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "LocalVersionHolder.h"
|
||||
#include "event_queue.h"
|
||||
#include "engine.h"
|
||||
#include "efilib2.h"
|
||||
|
||||
EXTERN_ENGINE
|
||||
;
|
||||
|
@ -313,7 +314,7 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex, Eng
|
|||
warning(OBD_Camshaft_Position_Sensor_Circuit_Range_Performance, "noisy trigger");
|
||||
return;
|
||||
}
|
||||
if (rpm > engine->engineConfiguration->rpmHardLimit) {
|
||||
if (rpm > engineConfiguration->rpmHardLimit) {
|
||||
warning(OBD_PCM_Processor_Fault, "skipping stroke due to rpm=%d", rpm);
|
||||
return;
|
||||
}
|
||||
|
@ -327,6 +328,7 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex, Eng
|
|||
if (eventIndex == 0) {
|
||||
if (localVersion.isOld())
|
||||
prepareOutputSignals(engine);
|
||||
uint32_t beforeIgnitionMath = GET_TIMESTAMP();
|
||||
|
||||
/**
|
||||
* TODO: warning. there is a bit of a hack here, todo: improve.
|
||||
|
@ -366,8 +368,9 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex, Eng
|
|||
|
||||
// todo: add some check for dwell overflow? like 4 times 6 ms while engine cycle is less then that
|
||||
|
||||
initializeIgnitionActions(fixAngle(-advance PASS_ENGINE_PARAMETER), dwellAngle,
|
||||
initializeIgnitionActions(-advance, dwellAngle,
|
||||
&engine->engineConfiguration2->ignitionEvents[revolutionIndex] PASS_ENGINE_PARAMETER);
|
||||
engine->ignitionMathTime = GET_TIMESTAMP() - beforeIgnitionMath;
|
||||
}
|
||||
|
||||
triggerEventsQueue.executeAll(getCrankEventCounter());
|
||||
|
|
|
@ -217,7 +217,7 @@ static void triggerInfo(Engine *engine) {
|
|||
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration->engineType),
|
||||
engineConfiguration->engineType, engineConfiguration->triggerConfig.triggerType);
|
||||
|
||||
scheduleMsg(&logger, "sn=%d", ts->isSynchronizationNeeded);
|
||||
scheduleMsg(&logger, "sn=%d ignitionMathTime=%d", ts->isSynchronizationNeeded, engine->ignitionMathTime);
|
||||
|
||||
scheduleMsg(&logger, "trigger event counters %d/%d/%d/%d", triggerCentral.getHwEventCounter(0),
|
||||
triggerCentral.getHwEventCounter(1), triggerCentral.getHwEventCounter(2),
|
||||
|
|
Loading…
Reference in New Issue