summaryrefslogtreecommitdiff
path: root/apps/NxWidgets
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-10-14 18:35:23 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-10-14 18:35:23 -0600
commitb5a37a3e45ac9faea285cc252e742c1c7267a6d7 (patch)
tree678ad7a3d43ff4bdbc9a5ba2bc280ad9dcfea2b6 /apps/NxWidgets
parentc4bd33095126562d1f54c63187288d98bf2c4eec (diff)
downloadnuttx-b5a37a3e45ac9faea285cc252e742c1c7267a6d7.tar.gz
nuttx-b5a37a3e45ac9faea285cc252e742c1c7267a6d7.tar.bz2
nuttx-b5a37a3e45ac9faea285cc252e742c1c7267a6d7.zip
NxWM::CCalibration: Add logic to collect and average samples, optionally discarding the most extreem values
Diffstat (limited to 'apps/NxWidgets')
-rw-r--r--apps/NxWidgets/Kconfig34
1 files changed, 31 insertions, 3 deletions
diff --git a/apps/NxWidgets/Kconfig b/apps/NxWidgets/Kconfig
index f5ccb409a..e1ca03169 100644
--- a/apps/NxWidgets/Kconfig
+++ b/apps/NxWidgets/Kconfig
@@ -772,7 +772,7 @@ config NXWM_CALIBRATION_MESSAGES
By default, the calibration screen is clear excecpt for the
calibratino touchpoints. If this options are enabled, then
instructions when to touch and when to release the touch will
- be added in the center of the dislay
+ be added in the center of the display,
if NXWM_CALIBRATION_MESSAGES
@@ -791,8 +791,36 @@ config NXWM_CALIBRATION_FONTID
Use this default NxWidgets font ID instead of the system font ID
(NXFONT_DEFAULT). Default: 0
-endif
-endif
+endif # NXWM_CALIBRATION_CUSTOM_FONTID
+
+config NXWM_CALIBRATION_AVERAGE
+ bool "Average Samples"
+ default n
+ ---help---
+ Collect multiple samples at each calibration position and use the
+ average of the samples. NOTE that is option is not available if we are
+ not providing instructions on the display. That is because it would
+ be impossible to know what to do if we are collecting multiple samples
+ at each position.
+
+if NXWM_CALIBRATION_AVERAGE
+
+config NXWM_CALIBRATION_NSAMPLES
+ int "Number of Samples in Average"
+ default 4
+ range 2 255
+ ---help---
+ This is the number of samples to use in the average.
+
+config NXWM_CALIBRATION_DISCARD_MINMAX
+ bool "Discard minimum and maximum values"
+ default n
+ ---help---
+ Discard the largest and smallest values before averaging. This
+ setting is ignored if NXWM_CALIBRATION_NSAMPLES < 3.
+
+endif # NXWM_CALIBRATION_AVERAGE
+endif # NXWM_CALIBRATION_MESSAGES
config NXWM_CUSTOM_CALIBRATION_ICON
bool "Custom Calibration Icon"