76// This is for transposing errors to a unique number to indicate loss of sync different to clear during search
77#define MaskBySumPattern 0x05 // 0xN4 >> 0xN9, 0xN8 >> 0xND, no collisions, free space for more too
78
79// Possible conditions of success and failure.
80//
81// Literals here for readability, checked below with formula and names
82//
83// Note, whether it is possible to strike these depends on the tolerance used
84
85// In sync:
86#define MatchedPairMatchedPair 68 // 0x44 small small small - All periods match
87#define MatchedPairNarrowWide 70 // 0x46 small small BIG - First tooth after missing
88#define NarrowWideWideNarrow 103 // 0x67 small BIG small - Second tooth after missing, the strongest and most certain sync
89#define WideNarrowMatchedPair 116 // 0x74 BIG small small - Third tooth after missing
90
91// Except when we should get something else:
92#define MatchedPairMatchedPairPlusMask 73 // 0x49 small small small - All periods match (Indicates wrong decoder with too few teeth, same missing)
93#define MatchedPairNarrowWidePlusMask 75 // 0x4B small small BIG - First tooth after missing (Indicates wrong decoder with too many teeth, same missing)
94#define NarrowWideWideNarrowPlusMask 108 // 0x6C small BIG small - Second tooth after missing, the strongest and most certain sync
95#define WideNarrowMatchedPairPlusMask 121 // 0x79 BIG small small - Third tooth after missing