Added deadband and limit function.