Abstract:
A method of dynamically adjusting threshold values for an electronic device is disclosed. The method comprises setting the base proximity value to a maximum proximity value; polling a detected proximity value; determining a first range where the detected proximity value falls according to a mapping table; setting the base proximity value to a largest value of the first range; determining a high threshold value and a low threshold value according to the base proximity value; and resetting the base proximity value to a default value when the proximity function is disabled.
Abstract:
A method of dynamically adjusting threshold values for an electronic device is disclosed. The method comprises setting the base proximity value to a maximum proximity value; polling a detected proximity value; determining a first range where the detected proximity value falls according to a mapping table; setting the base proximity value to a largest value of the first range; determining a high threshold value and a low threshold value according to the base proximity value; and resetting the base proximity value to a default value when the proximity function is disabled.