Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 177:8620cdfcdbf2, committed 2019-07-11
- Comitter:
- kerrysmartin
- Date:
- Thu Jul 11 14:02:46 2019 +0000
- Parent:
- 176:4ab96d33a8ec
- Commit message:
- Initial check in
Changed in this revision
| RA8875_Touch.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/RA8875_Touch.cpp Sun Mar 24 14:49:49 2019 +0000
+++ b/RA8875_Touch.cpp Thu Jul 11 14:02:46 2019 +0000
@@ -69,7 +69,7 @@
touchSample = 0;
touchState = no_cal;
//touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
- #if (MBED_MAJOR_VERSION >= 5) || (MBED_LIBRARY_VERSION > 122) // Is this the right version?
+ #if (MBED_MAJOR_VERSION >= 5) || (MBED_LIBRARY_VERSION > 128) // Is this the right version?
touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
#else
touchTicker.attach_us(this, &RA8875::_TouchTicker, TOUCH_TICKER_uS);
@@ -113,7 +113,7 @@
touchState = no_cal;
if (bTpEnable == TP_ENABLE) {
//touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
- #if (MBED_MAJOR_VERSION >= 5) || (MBED_LIBRARY_VERSION > 122) // Is this the right version?
+ #if (MBED_MAJOR_VERSION >= 5) || (MBED_LIBRARY_VERSION > 128) // Is this the right version?
touchTicker.attach_us(callback(this, &RA8875::_TouchTicker), TOUCH_TICKER_uS);
#else
touchTicker.attach_us(this, &RA8875::_TouchTicker, TOUCH_TICKER_uS);
@@ -309,7 +309,7 @@
if (ts != no_touch) {
panelTouched = true;
numberOfTouchPoints = 1;
-
+ INFO("Raw Values: (%d, %d)", a2dX, a2dY);
if (tpMatrix.Divider != 0) {
/* Operation order is important since we are doing integer */
/* math. Make sure you add all terms together before */
@@ -321,7 +321,9 @@
touchInfo[0].coordinates.y = ( (tpMatrix.Dn * a2dX) +
(tpMatrix.En * a2dY) + tpMatrix.Fn
) / tpMatrix.Divider ;
+ INFO("Calced Values: (%d, %d)", touchInfo[0].coordinates.x, touchInfo[0].coordinates.y);
} else {
+ INFO("NO CAL!!");
ts = no_cal;
}
} else {
@@ -420,7 +422,7 @@
void RA8875::_TouchTicker(void)
{
- INFO("_TouchTicker()");
+ //INFO("_TouchTicker()");
if (timeSinceTouch.read_us() > NOTOUCH_TIMEOUT_uS) {
touchSample = 0;
if (touchState == held)