Some commenting and simplification.
Repeated SIGINT forces a quit.
Correct lockout message.
Refactor the main loop to make the logic easier to see.
Get rid of some duplicated code.
match_start -> match_success_start

Rename to be more clear what it means.

Also some more commenting.
Make it clear what match_success is refering to in should_we_lockout.

It is refering to the over all match, not jsut a single image like in other places.
Wait until the frame is cleared on a successful match.

After we have performed a successful match over the set of images, before we would simply start a timer before we tried to match again. However, from some real world testing it turns out this isn't enough.

When it's raining or snowing the cat likes to go out through the corridor where the match is made. This will result in "OK" match, and the timer starts... However, the cat doesn't feel like getting wet, so it will just sit there and look outsid, still in the corridor. So after the timer ends, the full frame will be occupied by the cats body and we will get a FAILED match.

This new approach instead waits until the frame is cleared after a successful match before the timer starts. This probably removes the need for the timer, but I'll still keep it but set the default to 0 seconds.
ake
Add an unknown match direction on failure.

Also get rid of the rfid_direction_t and use match_direction_t for that as well.
Replaced the "lockout" and "overall_match_success" vars with a state instead.

This makes it more clear that the states cannot be mixed. You cannot have a overall match success and lockout at the same time.