Fix bug in watchdog configuration.
Implemented first pass at peak detection funciton.