mirror of https://github.com/rusefi/rusefi.git
auto-sync
This commit is contained in:
parent
c0299d3704
commit
ec3fd7ba25
|
@ -388,6 +388,8 @@ static ALWAYS_INLINE void scheduleIgnitionAndFuelEvents(int rpm, int revolutionI
|
||||||
* Both injection and ignition are controlled from this method.
|
* Both injection and ignition are controlled from this method.
|
||||||
*/
|
*/
|
||||||
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_S) {
|
void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECLARE_ENGINE_PARAMETER_S) {
|
||||||
|
(void) ckpSignalType;
|
||||||
|
|
||||||
ENGINE(m.beforeMainTrigger) = GET_TIMESTAMP();
|
ENGINE(m.beforeMainTrigger) = GET_TIMESTAMP();
|
||||||
if (hasFirmwareError()) {
|
if (hasFirmwareError()) {
|
||||||
/**
|
/**
|
||||||
|
@ -396,11 +398,16 @@ void mainTriggerCallback(trigger_event_e ckpSignalType, uint32_t eventIndex DECL
|
||||||
*/
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) ckpSignalType;
|
|
||||||
efiAssertVoid(eventIndex < 2 * engine->triggerShape.getSize(), "trigger/event index");
|
|
||||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 128, "lowstck#2");
|
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);
|
int rpm = ENGINE(rpmCalculator.rpmValue);
|
||||||
if (rpm == 0) {
|
if (rpm == 0) {
|
||||||
// this happens while we just start cranking
|
// this happens while we just start cranking
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// This file was generated by Version2Header
|
// 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
|
#ifndef VCS_VERSION
|
||||||
#define VCS_VERSION "10001"
|
#define VCS_VERSION "10013"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue