auto-sync

This commit is contained in:
rusEfi 2016-06-12 16:01:41 -04:00
parent c0299d3704
commit ec3fd7ba25
2 changed files with 12 additions and 5 deletions

View File

@ -388,6 +388,8 @@ static ALWAYS_INLINE void scheduleIgnitionAndFuelEvents(int rpm, int revolutionI
* Both injection and ignition are controlled from this method.
*/
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_S) {
(void) ckpSignalType;
ENGINE(m.beforeMainTrigger) = GET_TIMESTAMP();
if (hasFirmwareError()) {
/**
@ -396,11 +398,16 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECL
*/
return;
}
(void) ckpSignalType;
efiAssertVoid(eventIndex < 2 * engine->triggerShape.getSize(), "trigger/event index");
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#2");
if (eventIndex >= ENGINE(triggerShape.getLength())) {
/**
* this could happen in case of a trigger error, just exit silently since the trigger error is supposed to be handled already
* todo: should this check be somewhere higher so that no trigger listeners are invoked with noise?
*/
return;
}
int rpm = ENGINE(rpmCalculator.rpmValue);
if (rpm == 0) {
// this happens while we just start cranking

View File

@ -1,5 +1,5 @@
// This file was generated by Version2Header
// Sun Jun 12 10:45:07 EDT 2016
// Sun Jun 12 15:11:11 EDT 2016
#ifndef VCS_VERSION
#define VCS_VERSION "10001"
#define VCS_VERSION "10013"
#endif