Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
197737d7bf
|
@ -16,6 +16,7 @@ current binaries are always available at http://rusefi.com/build_server/
|
|||
| 11/19/2017 | r14760 | improvement #495: incomppatible change - larger settings area |
|
||||
| 11/06/2017 | r14733 | improvement #487: single-point injection mode |
|
||||
| 10/26/2017 | r14700 | improvement #385: narrow band to wide band conversion table |
|
||||
| 08/31/2017 | | improvement #442: ADC_VCC should be configurable |
|
||||
| 07/24/2017 | r14513 | bugfix #307: TS bench test blinks three times |
|
||||
| 07/13/2017 | r14476 | bugfix #461: SAXParserException on console start-up due to damaged settings.xml file |
|
||||
| 07/09/2017 | r14473 | improvement: IAC solenoid frequencty changeable on the fly |
|
||||
|
|
|
@ -79,9 +79,9 @@ void Engine::updateSlowSensors(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineState.injectorLag = getInjectorLag(sensors.vBatt PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
}
|
||||
|
||||
void Engine::onTriggerEvent(efitick_t nowNt) {
|
||||
void Engine::onTriggerSignalEvent(efitick_t nowNt) {
|
||||
isSpinning = true;
|
||||
lastTriggerEventTimeNt = nowNt;
|
||||
lastTriggerToothEventTimeNt = nowNt;
|
||||
}
|
||||
|
||||
Engine::Engine() {
|
||||
|
@ -120,7 +120,7 @@ void Engine::reset() {
|
|||
* it's important for fixAngle() that engineCycle field never has zero
|
||||
*/
|
||||
engineCycle = getEngineCycle(FOUR_STROKE_CRANK_SENSOR);
|
||||
lastTriggerEventTimeNt = 0;
|
||||
lastTriggerToothEventTimeNt = 0;
|
||||
isCylinderCleanupMode = false;
|
||||
engineCycleEventCount = 0;
|
||||
stopEngineRequestTimeNt = 0;
|
||||
|
@ -339,6 +339,8 @@ void Engine::watchdog() {
|
|||
#ifndef RPM_LOW_THRESHOLD
|
||||
#define RPM_LOW_THRESHOLD 240
|
||||
#endif
|
||||
// note that we are ignoring the number of tooth here - we
|
||||
// check for duration between tooth as if we only have one tooth per revolution which is not the case
|
||||
#define REVOLUTION_TIME_HIGH_THRESHOLD (60 * 1000000LL / RPM_LOW_THRESHOLD)
|
||||
/**
|
||||
* todo: better watch dog implementation should be implemented - see
|
||||
|
@ -347,7 +349,7 @@ void Engine::watchdog() {
|
|||
* note that the result of this subtraction could be negative, that would happen if
|
||||
* we have a trigger event between the time we've invoked 'getTimeNow' and here
|
||||
*/
|
||||
efitick_t timeSinceLastTriggerEvent = nowNt - lastTriggerEventTimeNt;
|
||||
efitick_t timeSinceLastTriggerEvent = nowNt - lastTriggerToothEventTimeNt;
|
||||
if (timeSinceLastTriggerEvent < US2NT(REVOLUTION_TIME_HIGH_THRESHOLD)) {
|
||||
return;
|
||||
}
|
||||
|
@ -357,7 +359,7 @@ void Engine::watchdog() {
|
|||
scheduleMsg(&logger, "engine has STOPPED");
|
||||
scheduleMsg(&logger, "templog engine has STOPPED [%x][%x] [%x][%x] %d",
|
||||
(int)(nowNt >> 32), (int)nowNt,
|
||||
(int)(lastTriggerEventTimeNt >> 32), (int)lastTriggerEventTimeNt,
|
||||
(int)(lastTriggerToothEventTimeNt >> 32), (int)lastTriggerToothEventTimeNt,
|
||||
(int)timeSinceLastTriggerEvent
|
||||
);
|
||||
triggerInfo();
|
||||
|
|
|
@ -415,10 +415,13 @@ public:
|
|||
*/
|
||||
int ignitionPin[IGNITION_PIN_COUNT];
|
||||
|
||||
void onTriggerEvent(efitick_t nowNt);
|
||||
/**
|
||||
* this is invoked each time we register a trigger tooth signal
|
||||
*/
|
||||
void onTriggerSignalEvent(efitick_t nowNt);
|
||||
EngineState engineState;
|
||||
SensorsState sensors;
|
||||
efitick_t lastTriggerEventTimeNt;
|
||||
efitick_t lastTriggerToothEventTimeNt;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -252,7 +252,7 @@ void TriggerCentral::handleShaftSignal(trigger_event_e signal DECLARE_ENGINE_PAR
|
|||
|
||||
nowNt = getTimeNowNt();
|
||||
|
||||
engine->onTriggerEvent(nowNt);
|
||||
engine->onTriggerSignalEvent(nowNt);
|
||||
|
||||
#if EFI_HISTOGRAMS && EFI_PROD_CODE
|
||||
int beforeCallback = hal_lld_get_counter_value();
|
||||
|
|
Loading…
Reference in New Issue