mirror of https://github.com/rusefi/rusefi-1.git
auto-sync
This commit is contained in:
parent
ff9af5294f
commit
b6bacbf8bb
|
@ -69,5 +69,5 @@ void configureMiniCooperTriggerShape(trigger_shape_s *s) {
|
||||||
/**
|
/**
|
||||||
* With just one tooth on camshaft synchronization is not needed
|
* With just one tooth on camshaft synchronization is not needed
|
||||||
*/
|
*/
|
||||||
s->isSynchronizationNeeded = FALSE;
|
s->isSynchronizationNeeded = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,15 +190,20 @@ static void triggerShapeInfo(Engine *engine) {
|
||||||
|
|
||||||
static void triggerInfo(Engine *engine) {
|
static void triggerInfo(Engine *engine) {
|
||||||
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
#if (EFI_PROD_CODE || EFI_SIMULATOR) || defined(__DOXYGEN__)
|
||||||
|
|
||||||
|
trigger_shape_s *ts = &engineConfiguration2->triggerShape;
|
||||||
|
|
||||||
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration->engineType),
|
scheduleMsg(&logger, "Template %s/%d trigger %d", getConfigurationName(engineConfiguration->engineType),
|
||||||
engineConfiguration->engineType, engineConfiguration->triggerConfig.triggerType);
|
engineConfiguration->engineType, engineConfiguration->triggerConfig.triggerType);
|
||||||
|
|
||||||
|
scheduleMsg(&logger, "sn=%d", ts->isSynchronizationNeeded);
|
||||||
|
|
||||||
scheduleMsg(&logger, "trigger event counters %d/%d/%d/%d", triggerCentral.getHwEventCounter(0),
|
scheduleMsg(&logger, "trigger event counters %d/%d/%d/%d", triggerCentral.getHwEventCounter(0),
|
||||||
triggerCentral.getHwEventCounter(1), triggerCentral.getHwEventCounter(2),
|
triggerCentral.getHwEventCounter(1), triggerCentral.getHwEventCounter(2),
|
||||||
triggerCentral.getHwEventCounter(3));
|
triggerCentral.getHwEventCounter(3));
|
||||||
scheduleMsg(&logger, "expected cycle events %d/%d/%d", engineConfiguration2->triggerShape.expectedEventCount[0],
|
scheduleMsg(&logger, "expected cycle events %d/%d/%d", engineConfiguration2->triggerShape.expectedEventCount[0],
|
||||||
engineConfiguration2->triggerShape.expectedEventCount[1],
|
engineConfiguration2->triggerShape.expectedEventCount[1],
|
||||||
engineConfiguration2->triggerShape.expectedEventCount[2]);
|
ts->expectedEventCount[2]);
|
||||||
|
|
||||||
scheduleMsg(&logger, "trigger type=%d/need2ndChannel=%s", engineConfiguration->triggerConfig.triggerType,
|
scheduleMsg(&logger, "trigger type=%d/need2ndChannel=%s", engineConfiguration->triggerConfig.triggerType,
|
||||||
boolToString(engineConfiguration->needSecondTriggerInput));
|
boolToString(engineConfiguration->needSecondTriggerInput));
|
||||||
|
@ -245,5 +250,4 @@ void initTriggerCentral(Engine *engine) {
|
||||||
#if EFI_HISTOGRAMS
|
#if EFI_HISTOGRAMS
|
||||||
initHistogram(&triggerCallback, "all callbacks");
|
initHistogram(&triggerCallback, "all callbacks");
|
||||||
#endif /* EFI_HISTOGRAMS */
|
#endif /* EFI_HISTOGRAMS */
|
||||||
initTriggerDecoder();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,9 @@ static cyclic_buffer errorDetection;
|
||||||
|
|
||||||
bool printGapRatio = false;
|
bool printGapRatio = false;
|
||||||
|
|
||||||
|
#else
|
||||||
|
Logging logger;
|
||||||
|
|
||||||
#endif /* ! EFI_PROD_CODE */
|
#endif /* ! EFI_PROD_CODE */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,6 +63,9 @@ static inline bool isSynchronizationGap(TriggerState const *shaftPositionState,
|
||||||
float gap = 1.0 * currentDuration / shaftPositionState->toothed_previous_duration;
|
float gap = 1.0 * currentDuration / shaftPositionState->toothed_previous_duration;
|
||||||
print("current gap %f\r\n", gap);
|
print("current gap %f\r\n", gap);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// float gap = 1.0 * currentDuration / shaftPositionState->toothed_previous_duration;
|
||||||
|
// scheduleMsg(&logger, "gap=%f", gap);
|
||||||
|
|
||||||
#endif /* ! EFI_PROD_CODE */
|
#endif /* ! EFI_PROD_CODE */
|
||||||
|
|
||||||
|
@ -390,7 +396,7 @@ uint32_t findTriggerZeroEventIndex(trigger_shape_s * shape, trigger_config_s con
|
||||||
|
|
||||||
void initTriggerDecoder(void) {
|
void initTriggerDecoder(void) {
|
||||||
#if EFI_PROD_CODE || EFI_SIMULATOR
|
#if EFI_PROD_CODE || EFI_SIMULATOR
|
||||||
// initLogging(&logger, "trigger decoder");
|
initLogging(&logger, "trigger decoder");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,14 @@ void initHardware(Logging *logger, Engine *engine) {
|
||||||
initHistogramsModule();
|
initHistogramsModule();
|
||||||
#endif /* EFI_HISTOGRAMS */
|
#endif /* EFI_HISTOGRAMS */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is so early because we want to init logger
|
||||||
|
* which would be used while finding trigger synch index
|
||||||
|
* while config read
|
||||||
|
*/
|
||||||
|
initTriggerDecoder();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We need the LED_ERROR pin even before we read configuration
|
* We need the LED_ERROR pin even before we read configuration
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue