diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-10-17 17:26:06 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-10-17 17:26:06 -0600 |
commit | 26a35531f5c2a608bcfcbd8fea04506bb7fe04de (patch) | |
tree | a2da823b933b389a22959b677b604765d26e983a /NxWidgets/nxwm | |
parent | f92f9d7fec30cd8ea592df33c7126b9531eca834 (diff) | |
download | nuttx-26a35531f5c2a608bcfcbd8fea04506bb7fe04de.tar.gz nuttx-26a35531f5c2a608bcfcbd8fea04506bb7fe04de.tar.bz2 nuttx-26a35531f5c2a608bcfcbd8fea04506bb7fe04de.zip |
SAMA5 TSD: Fix to prohibit reading samples when not valid
Diffstat (limited to 'NxWidgets/nxwm')
-rw-r--r-- | NxWidgets/nxwm/src/ccalibration.cxx | 8 | ||||
-rw-r--r-- | NxWidgets/nxwm/src/ctouchscreen.cxx | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/NxWidgets/nxwm/src/ccalibration.cxx b/NxWidgets/nxwm/src/ccalibration.cxx index 51b536db0..b52744554 100644 --- a/NxWidgets/nxwm/src/ccalibration.cxx +++ b/NxWidgets/nxwm/src/ccalibration.cxx @@ -1156,7 +1156,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.left.slope = (bottomX - topX) / (bottomY - topY); data.left.offset = topX - topY * data.left.slope; - idbg("Left slope: %f offset: %f\n", data.left.slope, data.left.offset); + idbg("Left slope: %f6.2 offset: %f6.2\n", data.left.slope, data.left.offset); topX = (float)m_calibData[CALIB_UPPER_RIGHT_INDEX].x; bottomX = (float)m_calibData[CALIB_LOWER_RIGHT_INDEX].x; @@ -1167,7 +1167,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.right.slope = (bottomX - topX) / (bottomY - topY); data.right.offset = topX - topY * data.right.slope; - idbg("Right slope: %f offset: %f\n", data.right.slope, data.right.offset); + idbg("Right slope: %f6.2 offset: %f6.2\n", data.right.slope, data.right.offset); // Y lines: // @@ -1185,7 +1185,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.top.slope = (rightY - leftY) / (rightX - leftX); data.top.offset = leftY - leftX * data.top.slope; - idbg("Top slope: %f offset: %f\n", data.top.slope, data.top.offset); + idbg("Top slope: %f6.2 offset: %f6.2\n", data.top.slope, data.top.offset); leftX = (float)m_calibData[CALIB_LOWER_LEFT_INDEX].x; rightX = (float)m_calibData[CALIB_LOWER_RIGHT_INDEX].x; @@ -1196,7 +1196,7 @@ bool CCalibration::createCalibrationData(struct SCalibrationData &data) data.bottom.slope = (rightY - leftY) / (rightX - leftX); data.bottom.offset = leftY - leftX * data.bottom.slope; - idbg("Bottom slope: %f offset: %f\n", data.bottom.slope, data.bottom.offset); + idbg("Bottom slope: %f6.2 offset: %f6.2\n", data.bottom.slope, data.bottom.offset); // Save also the calibration screen positions diff --git a/NxWidgets/nxwm/src/ctouchscreen.cxx b/NxWidgets/nxwm/src/ctouchscreen.cxx index 105908859..b1f9f0557 100644 --- a/NxWidgets/nxwm/src/ctouchscreen.cxx +++ b/NxWidgets/nxwm/src/ctouchscreen.cxx @@ -531,6 +531,8 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample) x = (nxgl_coord_t)scaledX; y = (nxgl_coord_t)scaledY; + vdbg("raw: (%f6.2, %f6.2) scaled: (%f6.2, %f6.2) (%d, %d)\n", + rawX, rawY, scaledX, scaledY, x, y); #else // We have valid coordinates. Get the raw touch // position from the sample @@ -577,9 +579,8 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample) y = (nxgl_coord_t)bigY; } -#endif - vdbg("raw: (%d, %d) scaled: (%d, %d)\n", rawX, rawY, x, y); +#endif } // Get the server handle and "inject the mouse data |