Add some hysteresis to get rid of the worst noise.