mirror of https://github.com/rusefi/rusefi-1.git
Trigger gap-check toothDuration array samples time at any event? fix #1658
This commit is contained in:
parent
64e129f0a7
commit
74f8efd7e1
|
@ -292,6 +292,9 @@ void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) {
|
||||||
// so we pass them to handleShaftSignal() and defer this test
|
// so we pass them to handleShaftSignal() and defer this test
|
||||||
if (!CONFIG(useNoiselessTriggerDecoder)) {
|
if (!CONFIG(useNoiselessTriggerDecoder)) {
|
||||||
if (!isUsefulSignal(signal PASS_CONFIG_PARAMETER_SUFFIX)) {
|
if (!isUsefulSignal(signal PASS_CONFIG_PARAMETER_SUFFIX)) {
|
||||||
|
/**
|
||||||
|
* no need to process VR falls further
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -413,6 +416,9 @@ bool TriggerNoiseFilter::noiseFilter(efitick_t nowNt,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is NOT invoked for VR falls.
|
||||||
|
*/
|
||||||
void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
efiAssertVoid(CUSTOM_CONF_NULL, engine!=NULL, "configuration");
|
efiAssertVoid(CUSTOM_CONF_NULL, engine!=NULL, "configuration");
|
||||||
|
|
||||||
|
|
|
@ -376,7 +376,8 @@ void TriggerState::onShaftSynchronization(const TriggerStateCallback triggerCycl
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Trigger decoding happens here
|
* @brief Trigger decoding happens here
|
||||||
* This method is invoked every time we have a fall or rise on one of the trigger sensors.
|
* VR falls are filtered out and some VR noise detection happens prior to invoking this method, for
|
||||||
|
* Hall this method is invoked every time we have a fall or rise on one of the trigger sensors.
|
||||||
* This method changes the state of trigger_state_s data structure according to the trigger event
|
* This method changes the state of trigger_state_s data structure according to the trigger event
|
||||||
* @param signal type of event which just happened
|
* @param signal type of event which just happened
|
||||||
* @param nowNt current time
|
* @param nowNt current time
|
||||||
|
|
|
@ -17,7 +17,10 @@ EXTERN_ENGINE;
|
||||||
// this is not the only place where we have 'isUpEvent'. todo: reuse
|
// this is not the only place where we have 'isUpEvent'. todo: reuse
|
||||||
static const bool isRisingEdge[HW_EVENT_TYPES] = { false, true, false, true, false, true };
|
static const bool isRisingEdge[HW_EVENT_TYPES] = { false, true, false, true, false, true };
|
||||||
|
|
||||||
// todo: should this method be invoked somewhere deeper? at the moment we have too many usages too high
|
/**
|
||||||
|
* todo: should this method be invoked somewhere deeper? at the moment we have too many usages too high
|
||||||
|
* @return true if front should be decoded further, false if we are not interested
|
||||||
|
*/
|
||||||
bool isUsefulSignal(trigger_event_e signal DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
bool isUsefulSignal(trigger_event_e signal DECLARE_CONFIG_PARAMETER_SUFFIX) {
|
||||||
return !engineConfiguration->useOnlyRisingEdgeForTrigger || isRisingEdge[(int) signal];
|
return !engineConfiguration->useOnlyRisingEdgeForTrigger || isRisingEdge[(int) signal];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue