Touchscreen device and method of operating the same
A method of operating a touchscreen device includes measuring a raw data value at a touch node among a plurality of touch nodes on the touchscreen device, assigning a positive touch value to each touch node having a positive raw data value greater than a first predetermined threshold, assigning a negative touch value to each touch node having a negative raw data value less than a second predetermined threshold, determining a total count of the positive touch values and negative touch values, determining a differ count for each of the touch nodes, the differ count being a number of touch nodes containing the negative touch values surrounding each touch node, calculating a percentage based on a ratio of a sum of the differ count and the total count, and entering a pre-water mode when the percentage exceeds a threshold percentage.
1 . A method of operating a touchscreen device, the method comprising:
measuring a raw data value at a touch node among a plurality of touch nodes corresponding to a current touch bitmap of the touchscreen device;
assigning a positive touch value to each of the touch nodes on the current touch bitmap having a positive raw data value greater than a first predetermined threshold;
assigning a negative touch value to each of the touch nodes on the current touch bitmap having a negative raw data value less than a second predetermined threshold;
determining a total count of touch nodes having the positive touch values and the negative touch values for the current touch bitmap;
determining a differ count for each of the touch nodes for the current touch bitmap, the differ count being based on a number of the touch nodes having the positive touch values or the negative touch values surrounding that touch node, wherein the differ count for each of the touch nodes assigned the positive touch value is a sum of the number of touch nodes having the negative touch values surrounding that touch node and wherein the differ count for each of the touch nodes assigned the negative touch value is a sum of the number of touch nodes having the positive touch values surrounding that touch node;
calculating a percentage based on a ratio of a sum of the differ count and the total count for the current touch bitmap; and
entering a pre-water mode in response to the percentage exceeding a threshold percentage.
2 . The method of claim 1 , further comprising transitioning from the pre-water mode to a water mode when a touch input is not detected and a sum of the positive raw data values is less than an absolute value of a sum of the negative raw data values.
3 . The method of claim 1 , further comprising transitioning from the pre-water mode to a normal mode when a touch input is not detected and a sum of the positive raw data values is greater than an absolute value of a sum of the negative raw data values.
4 . The method of claim 1 , wherein assigning the positive touch value to each of the touch nodes comprises assigning each of the touch nodes a value of 1.
5 . The method of claim 4 , wherein assigning the negative touch value to each of the touch nodes comprises assigning each of the touch nodes a value of −1.
6 . The method of claim 5 , wherein the percentage based on the ratio of the sum of the differ count and the total count is equal to
sum
of
the
differ
count
total
count
of
the
positive
touch
values
and
negative
touch
values
*
100.
7 . The method of claim 1 , wherein the threshold percentage is 100%.
8 . The method of claim 1 , further comprising:
determining that a touch input and water are on the touchscreen in response to the percentage exceeding the threshold percentage; and
detecting a removal of the water on the touchscreen in response to the percentage not exceeding the threshold percentage.
9 . A method of operating an electronic device, the method comprising:
detecting touch input on a touchscreen of the electronic device;
detecting water on the touchscreen;
measuring positive touch values and negative touch values across a plurality of touch nodes corresponding to a current touch bitmap, the positive touch values and the negative touch values being generated by the detected touch input and water;
determining a differ count for each of the plurality of touch nodes for the current touch bitmap, wherein the differ count for each of the touch nodes assigned the positive touch value is a sum of a number of touch nodes having the negative touch values surrounding that touch node and wherein the differ count for each of the touch nodes assigned the negative touch value is a sum of a number of touch nodes having the positive touch values surrounding that touch node;
calculating a percentage based on a ratio of a sum of the differ count and a total count of non-zero touch nodes for the current touch bitmap;
determining that the touch input and the water are on the touchscreen in response to the percentage exceeding a threshold percentage;
entering a pre-water mode in response to determining that the touch input and the water are on the touchscreen;
enabling a first filter in the pre-water mode so that water detection is reduced;
transitioning to a water mode from the pre-water mode when the touch input is no longer detected and a sum of the positive touch values on the current touch bitmap is less than an absolute value of a sum of the negative touch values on the current touch bitmap; and
enabling a second filter in the water mode so that water detection is further reduced, the second filter being a heavier filter than the first filter.
10 . The method of claim 9 , further comprising:
detecting the touch input leaving the touchscreen; and
transitioning to a normal mode from the pre-water mode in response to detecting the touch input leaving the touchscreen and a sum of the positive touch values is greater than an absolute value of a sum of the negative touch values.
11 . The method of claim 9 , further comprising:
detecting the touch input leaving the touchscreen; and
transitioning to the water mode from a normal mode in response to detecting water on the touchscreen and detecting the touch input leaving the touchscreen.
12 . The method of claim 9 , further comprising:
detecting a removal of the water on the touchscreen in response to the percentage being less than or equal to the threshold percentage; and
transitioning to a normal mode from the water mode in response to detecting the removal of the water from the touchscreen.
13 . The method of claim 9 , wherein the touch input comprises a finger touch or pen touch.
14 . An electronic device, the device comprising:
a touchscreen;
a touchscreen controller;
a non-transitory memory storing a program to be executed by the touchscreen controller, the program comprising instructions to:
measure a raw data value at a touch node among a plurality of touch nodes corresponding to a current touch bitmap of the touchscreen;
assign a positive touch value to each of the touch nodes on the current touch bitmap having a positive raw data value greater than a first predetermined threshold;
assign a negative touch value to each of the touch nodes on the current touch bitmap having a negative raw data value less than a second predetermined threshold;
determine a total count of the positive touch values and the negative touch values for the current touch bitmap;
determine a differ count for each of the touch nodes for the current touch bitmap, the differ count being based on a number of the touch nodes having the positive touch values or the negative touch values surrounding that touch node, wherein the differ count for each of the touch nodes assigned the positive touch value is a sum of the number of touch nodes having the negative touch values surrounding that touch node and wherein the differ count for each of the touch nodes assigned the negative touch value is a sum of the number of touch nodes having the positive touch values surrounding that touch node;
calculate a percentage based on a ratio of a sum of the differ count and the total count for the current touch bitmap; and
enter a pre-water mode when the percentage exceeds a threshold percentage.
15 . The device of claim 14 , wherein the program further comprises instructions to transition from the pre-water mode to a water mode when a touch input is not detected and a sum of the positive raw data values is less than an absolute value of a sum of the negative raw data values.
16 . The device of claim 14 , wherein the program further comprises instructions to transition from the pre-water mode to a normal mode when a touch input is not detected and a sum of the positive raw data values is greater than an absolute value of a sum of the negative raw data values.
17 . The device of claim 14 , wherein assigning the positive touch value to each of the touch nodes comprises assigning each of the touch nodes a value of 1.
18 . The device of claim 17 , wherein assigning the negative touch value to each of the touch nodes comprises assigning each of the touch nodes a value of −1.
19 . The device of claim 18 , wherein the percentage based on the ratio of the sum of the differ count and the total count is equal to
sum
of
the
differ
count
total
count
of
the
positive
touch
values
and
negative
touch
values
*
100.
20 . The device of claim 14 , wherein the threshold percentage is greater than or equal to 100%.
21 . The device of claim 14 , wherein the program further comprises instructions to:
determine that a touch input and water are on the touchscreen in response to the percentage exceeding the threshold percentage; and
detect a removal of the water on the touchscreen in response to the percentage not exceeding the threshold percentage.