auto-sync

This commit is contained in:
rusEfi 2015-07-27 00:01:35 -04:00
parent d09b6c2339
commit d4e48a142d
1 changed files with 15 additions and 5 deletions

View File

@ -164,11 +164,20 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#2z"); efiAssertVoid(getRemainingStack(chThdSelf()) > 256, "lowstck#2z");
#endif #endif
#if EFI_ANALOG_CHART || defined(__DOXYGEN__)
angle_t crankAngle;
int signal;
if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
crankAngle = getCrankshaftAngleNt(nowNt PASS_ENGINE_PARAMETER);
signal = 1000 * ckpSignalType + index;
}
#endif
if (index != 0) { if (index != 0) {
#if EFI_ANALOG_CHART || defined(__DOXYGEN__) #if EFI_ANALOG_CHART || defined(__DOXYGEN__)
if (boardConfiguration->sensorChartMode == SC_TRIGGER) if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
scAddData(getCrankshaftAngleNt(nowNt PASS_ENGINE_PARAMETER), scAddData(crankAngle, signal);
1000 * ckpSignalType + index); }
#endif #endif
return; return;
} }
@ -195,8 +204,9 @@ void rpmShaftPositionCallback(trigger_event_e ckpSignalType,
rpmState->onNewEngineCycle(); rpmState->onNewEngineCycle();
rpmState->lastRpmEventTimeNt = nowNt; rpmState->lastRpmEventTimeNt = nowNt;
#if EFI_ANALOG_CHART || defined(__DOXYGEN__) #if EFI_ANALOG_CHART || defined(__DOXYGEN__)
if (boardConfiguration->sensorChartMode == SC_TRIGGER) if (boardConfiguration->sensorChartMode == SC_TRIGGER) {
scAddData(getCrankshaftAngleNt(nowNt PASS_ENGINE_PARAMETER), index); scAddData(crankAngle, signal);
}
#endif #endif
engine->m.rpmCbTime = GET_TIMESTAMP() - engine->m.beforeRpmCb; engine->m.rpmCbTime = GET_TIMESTAMP() - engine->m.beforeRpmCb;
} }