diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-11 22:07:06 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-11 22:07:06 +0000 |
commit | 4ddf48475760e7d5b22e391573a940fd604847f8 (patch) | |
tree | cef6f0c0a4de577042efa654f8808a04c9de52cf /NxWidgets/UnitTests/nxwm | |
parent | 186c49997038f34f2b3efd6fd9aa4fde8f4213e1 (diff) | |
download | nuttx-4ddf48475760e7d5b22e391573a940fd604847f8.tar.gz nuttx-4ddf48475760e7d5b22e391573a940fd604847f8.tar.bz2 nuttx-4ddf48475760e7d5b22e391573a940fd604847f8.zip |
Fix a few STMPE11 touchscreen and NxWM touchscreen calibration bugs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4723 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/UnitTests/nxwm')
-rw-r--r-- | NxWidgets/UnitTests/nxwm/main.cxx | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/NxWidgets/UnitTests/nxwm/main.cxx b/NxWidgets/UnitTests/nxwm/main.cxx index 291267eb8..c7433f36e 100644 --- a/NxWidgets/UnitTests/nxwm/main.cxx +++ b/NxWidgets/UnitTests/nxwm/main.cxx @@ -79,16 +79,16 @@ struct SNxWmTest { - NxWM::CTaskbar *taskbar; // The task bar - NxWM::CStartWindow *startwindow; // The start window + NxWM::CTaskbar *taskbar; // The task bar + NxWM::CStartWindow *startwindow; // The start window #ifdef CONFIG_NXWM_TOUCHSCREEN - NxWM::CTouchscreen *touchscreen; // The touchscreen - NxWM::CCalibration *calibration; // The touchscreen calibration application - struct NxWM::SCalibrationData data; // Calibration data + NxWM::CTouchscreen *touchscreen; // The touchscreen + NxWM::CCalibration *calibration; // The touchscreen calibration application + struct NxWM::SCalibrationData calibData; // Calibration data #endif - unsigned int mmInitial; // Initial memory usage - unsigned int mmStep; // Memory Usage at beginning of test step - unsigned int mmSubStep; // Memory Usage at beginning of test sub-step + unsigned int mmInitial; // Initial memory usage + unsigned int mmStep; // Memory Usage at beginning of test step + unsigned int mmSubStep; // Memory Usage at beginning of test sub-step }; ///////////////////////////////////////////////////////////////////////////// @@ -459,6 +459,12 @@ static bool createCalibration(void) #ifdef CONFIG_NXWM_TOUCHSCREEN static bool runCalibration(void) { + // 1. Start the calibration application + // 2. Wait until calibration data is available + // 3. Stop the calibration application + // 4. Provide the calibration data to the touchscreen device application + // 5. Enable forwarding of touchscreen input + // Call CTaskBar::startApplication to start the Calibration application printf(MAIN_STRING "Start the calibration application\n"); @@ -472,11 +478,12 @@ static bool runCalibration(void) // Wait for calibration data printf(MAIN_STRING "Get calibration data\n"); - if (!g_nxwmtest.calibration->waitCalibrationData(g_nxwmtest.data)) + if (!g_nxwmtest.calibration->waitCalibrationData(g_nxwmtest.calibData)) { printf(MAIN_STRING "ERROR: Failed to get calibration data\n"); return false; } + showTestCaseMemory("After getting calibration data"); printf(MAIN_STRING "Stop the calibration application\n"); if (!g_nxwmtest.taskbar->stopApplication(g_nxwmtest.calibration)) @@ -484,8 +491,13 @@ static bool runCalibration(void) printf(MAIN_STRING "ERROR: Failed to stop the calibration application\n"); return false; } - showTestCaseMemory("After stopping the calibration application"); + + // Configure the touchscreen device and enable touch forwarding + + g_nxwmtest.touchscreen->setCalibrationData(g_nxwmtest.calibData); + g_nxwmtest.touchscreen->setEnabled(true); + showTestCaseMemory("After givin calibration dato to the touchscreen device\n"); return true; } #endif |