Syntax
TftTouchGetCoordinates(pMode As Bit), Bit
Parameters
|
Parameter
|
Description
|
|
pMode
|
Low Pass Filter Setting 1 = Use Low Pass Filter 0 = Do not use Low Pass Filter
|
|
Return Bit
|
Valid Coordinates 1 = Valid 0 = Not Valid
|
Overview
This procedure returns the Touch-to-Screen equivalent coordinates, which are placed into two global variables: wTouchToPointX and wTouchToPointY.
Low Pass Filter vs. No Filter:
- Low Pass Filter: Using the low pass filter results in slower but more accurate touch readings. It smooths out the ADC noise, making the results more reliable.
- No Low Pass Filter: Skipping the low pass filter provides faster touch readouts, but with potentially reduced accuracy.
Low Pass Filter Mechanics:
- When a touch event is detected that exceeds the minimum pressure threshold in the Z direction (Z_Threshold), a number of samples (TouchAveragePoints) are taken.
- X and Y are processed independently. Samples farther than TouchMedianDistance from the median for that axis are discarded.
- The remaining samples for each axis are averaged to produce the final coordinates.
The return value indicates whether a touch reading was obtained and the calibrated coordinates are within the usable screen bounds.
Example
TftTouchGetCoordinates(1)
Created with the Personal Edition of HelpNDoc: Ensure High-Quality Documentation with HelpNDoc's Hyperlink and Library Item Reports