auto-sync
This commit is contained in:
parent
4f3ebbc3f6
commit
ee066cb26f
|
@ -129,6 +129,8 @@ void TriggerState::decodeTriggerEvent(trigger_event_e const signal, efitime_t no
|
|||
currentDuration =
|
||||
currentDurationLong > 10 * US2NT(US_PER_SECOND_LL) ? 10 * US2NT(US_PER_SECOND_LL) : currentDurationLong;
|
||||
|
||||
bool_t isPrimary = triggerWheel == T_PRIMARY;
|
||||
|
||||
if (isLessImportant(signal)) {
|
||||
#if EFI_UNIT_TEST
|
||||
if (printTriggerDebug) {
|
||||
|
|
|
@ -105,7 +105,9 @@ void initTriggerDecoderLogger(Logging *sharedLogger);
|
|||
bool_t isTriggerDecoderError(void);
|
||||
|
||||
#define isLessImportant(signal) ((TRIGGER_SHAPE(useRiseEdge) && signal != SHAFT_PRIMARY_UP) \
|
||||
|| (!TRIGGER_SHAPE(useRiseEdge) && signal != SHAFT_PRIMARY_DOWN))
|
||||
|| (!TRIGGER_SHAPE(useRiseEdge) && signal != SHAFT_PRIMARY_DOWN) \
|
||||
|| (!isPrimary && TRIGGER_SHAPE(useOnlyPrimaryForSync)) \
|
||||
)
|
||||
|
||||
|
||||
#endif /* TRIGGER_DECODER_H_ */
|
||||
|
|
|
@ -39,6 +39,7 @@ TriggerShape::TriggerShape() :
|
|||
wave.waves = h.waves;
|
||||
// todo: false here, true in clear() what a mess!
|
||||
useRiseEdge = false;
|
||||
useOnlyPrimaryForSync = false;
|
||||
gapBothDirections = false;
|
||||
isSynchronizationNeeded = false;
|
||||
// todo: reuse 'clear' method?
|
||||
|
|
|
@ -59,6 +59,8 @@ public:
|
|||
* Should we use falls or rises for gap ratio detection?
|
||||
*/
|
||||
bool_t useRiseEdge;
|
||||
|
||||
bool_t useOnlyPrimaryForSync;
|
||||
/**
|
||||
* Should we measure gaps with events of both kinds?
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue