diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-12 14:00:33 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-12 14:00:33 -0600 |
commit | 7e06a4b634c49c116b10bcae606f7f939c13bd25 (patch) | |
tree | bf91794a956c254bcf7eb3a20f67778500d0fad3 /nuttx/include | |
parent | 8f5c593f85cc08c4c8a91b9044e290d438c4fe6f (diff) | |
download | px4-nuttx-7e06a4b634c49c116b10bcae606f7f939c13bd25.tar.gz px4-nuttx-7e06a4b634c49c116b10bcae606f7f939c13bd25.tar.bz2 px4-nuttx-7e06a4b634c49c116b10bcae606f7f939c13bd25.zip |
maXTouch: Add thresholding so that MOVE reports are not generated unless there is a significant change in the reported position
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/input/mxt.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/input/mxt.h b/nuttx/include/nuttx/input/mxt.h index 855e1bd02..2b4f1359f 100644 --- a/nuttx/include/nuttx/input/mxt.h +++ b/nuttx/include/nuttx/input/mxt.h @@ -59,6 +59,26 @@ # define CONFIG_MXT_NPOLLWAITERS 2 #endif +/* Thresholding + * + * New touch positions will only be reported when the X or Y data + * changes by these thresholds. This trades reduced data rates for some + * loss in dragging accuracy. For 12-bit values the raw ranges are + * 0-4095. So for example, if your display is 800x480, then THRESHX=5 + * and THRESHY=8 would correspond to a one pixel change. + * + * NOTE: This does nothing to reduce the interrupt rate. It only + * reduces the rate at which touch events are reports. + */ + +#ifndef CONFIG_MXT_MXT_THRESHX +# define CONFIG_MXT_MXT_THRESHX 5 +#endif + +#ifndef CONFIG_MXT_MXT_THRESHY +# define CONFIG_MXT_MXT_THRESHY 8 +#endif + /* Buttons are not supported */ #undef CONFIG_MXT_BUTTONS |