Text this: Adaptive Estimation Algorithm for Photoplethysmographic Heart Rate Based on Finite State Machine