|
2 | 2 | # SPDX-License-Identifier: MIT
|
3 | 3 |
|
4 | 4 | """
|
5 |
| -touch_calibrator_stmpe610.py 2022-01-20 v1.1 |
| 5 | +touch_calibrator_stmpe610.py 2022-01-21 v1.1 |
6 | 6 |
|
7 | 7 | Author(s): CedarGroveMakerStudios
|
8 | 8 |
|
|
15 | 15 | tuple can be copied and pasted into the calling code's touchscreen
|
16 | 16 | instantiation statement.
|
17 | 17 |
|
| 18 | +NOTE: When instantiating the STMPE610 controller, enter the 0-degree display |
| 19 | +rotation raw touch calibration value regardless of screen rotation value. |
| 20 | +The controller code will automatically adjust the calibration as needed. |
| 21 | +
|
18 | 22 | DISPLAY_ROTATION: Display rotation value in degrees. Only values of
|
19 | 23 | None, 0, 90, 180, and 270 degrees are accepted. Defaults to None, the
|
20 | 24 | previous orientation of the display.
|
|
42 | 46 | import adafruit_stmpe610
|
43 | 47 |
|
44 | 48 | # Operational parameters:
|
45 |
| -DISPLAY_ROTATION = 0 # Specify 0, 90, 180, or 270 degrees |
| 49 | +# Specify 0, 90, 180, or 270 degrees; |
| 50 | +# use 0 for instantiation calibration tuple. |
| 51 | +DISPLAY_ROTATION = 0 |
46 | 52 | REPL_ONLY = False # True to disable graphics
|
47 | 53 | RAW_DATA = True # Use touchscreen raw values; False to use display coordinates
|
48 | 54 |
|
49 |
| -# Previously measured raw calibration tuple for display coordinate mode (RAW_DATA = False): |
| 55 | +# Previously measured raw calibration tuple for |
| 56 | +# display coordinate mode (RAW_DATA = False): |
50 | 57 | CALIBRATION = ((357, 3812), (390, 3555))
|
51 | 58 |
|
52 | 59 | # A collection of colors used for graphic objects
|
|
0 commit comments