Improved pulse detection, so that protocols with multiple footer can be handled.