SR20VE trigger
This commit is contained in:
parent
0383e5a567
commit
29d13aa32a
|
@ -125,6 +125,15 @@ static trigger_value_e eventType[6] = { TV_FALL, TV_RISE, TV_FALL, TV_RISE, TV_F
|
|||
totalEventCountBase += TRIGGER_SHAPE(size); \
|
||||
}
|
||||
|
||||
|
||||
#define considerEventForGap() (!TRIGGER_SHAPE(useOnlyPrimaryForSync) || isPrimary)
|
||||
|
||||
#define needToSkipRise(type) (!TRIGGER_SHAPE(gapBothDirections)) && ((!TRIGGER_SHAPE(useRiseEdge)) && (type != TV_FALL))
|
||||
#define needToSkipFall(type) (!TRIGGER_SHAPE(gapBothDirections)) && ( TRIGGER_SHAPE(useRiseEdge) && (type != TV_RISE))
|
||||
|
||||
#define isLessImportant(type) (needToSkipFall(type) || needToSkipRise(type) || (!considerEventForGap()) )
|
||||
|
||||
|
||||
/**
|
||||
* @brief Trigger decoding happens here
|
||||
* This method is invoked every time we have a fall or rise on one of the trigger sensors.
|
||||
|
|
|
@ -125,11 +125,5 @@ void initTriggerDecoderLogger(Logging *sharedLogger);
|
|||
|
||||
bool isTriggerDecoderError(void);
|
||||
|
||||
#define considerEventForGap() (!TRIGGER_SHAPE(useOnlyPrimaryForSync) || isPrimary)
|
||||
|
||||
#define isLessImportant(type) ((!TRIGGER_SHAPE(gapBothDirections)) && (TRIGGER_SHAPE(useRiseEdge) && (type != TV_RISE)) \
|
||||
|| ((!TRIGGER_SHAPE(gapBothDirections)) && !TRIGGER_SHAPE(useRiseEdge) && (type != TV_FALL)) \
|
||||
|| (!considerEventForGap()) \
|
||||
)
|
||||
|
||||
#endif /* TRIGGER_DECODER_H_ */
|
||||
|
|
Loading…
Reference in New Issue