mirror of https://github.com/FOME-Tech/fome-fw.git
Trigger gap-check toothDuration array samples time at any event? fix #1658
This commit is contained in:
parent
8cdfc50862
commit
f5f416951a
|
@ -292,6 +292,9 @@ void hwHandleShaftSignal(trigger_event_e signal, efitick_t timestamp) {
|
|||
// so we pass them to handleShaftSignal() and defer this test
|
||||
if (!CONFIG(useNoiselessTriggerDecoder)) {
|
||||
if (!isUsefulSignal(signal PASS_CONFIG_PARAMETER_SUFFIX)) {
|
||||
/**
|
||||
* no need to process VR falls further
|
||||
*/
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -413,6 +416,9 @@ bool TriggerNoiseFilter::noiseFilter(efitick_t nowNt,
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is NOT invoked for VR falls.
|
||||
*/
|
||||
void TriggerCentral::handleShaftSignal(trigger_event_e signal, efitick_t timestamp DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
efiAssertVoid(CUSTOM_CONF_NULL, engine!=NULL, "configuration");
|
||||
|
||||
|
|
|
@ -376,7 +376,8 @@ void TriggerState::onShaftSynchronization(const TriggerStateCallback triggerCycl
|
|||
|
||||
/**
|
||||
* @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
|
||||
* @param signal type of event which just happened
|
||||
* @param nowNt current time
|
||||
|
|
|
@ -17,7 +17,10 @@ EXTERN_ENGINE;
|
|||
// 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 };
|
||||
|
||||
// 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) {
|
||||
return !engineConfiguration->useOnlyRisingEdgeForTrigger || isRisingEdge[(int) signal];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue