diff options
author | p2niemel <pia.s.niemela@nokia.com> | 2010-06-30 14:21:45 +0300 |
---|---|---|
committer | p2niemel <pia.s.niemela@nokia.com> | 2010-06-30 14:21:45 +0300 |
commit | cd8ee57a65fda024249a737d7005249b48c985f0 (patch) | |
tree | aafb95ffffbce448760156a9d51129ca282f290e /examples | |
parent | b66ea67a649078b75828cf4525359f90190c5244 (diff) |
added stationary testing
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sensors/test_manual/test_manual.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/sensors/test_manual/test_manual.cpp b/examples/sensors/test_manual/test_manual.cpp index 71b96923d7..83df52ba18 100644 --- a/examples/sensors/test_manual/test_manual.cpp +++ b/examples/sensors/test_manual/test_manual.cpp @@ -71,6 +71,7 @@ static QString dataRateString; static QString dataRangeString; static QString resolutionString; static int counter; +static bool isStationary = false; /////////////////////////////////////////// //cpp file @@ -151,7 +152,7 @@ void SensorSlotClass::slotAccelerationData(){ checkRate(&accelerometer, m_accelerometerTimestamp); - if (counter==4) checkResolution(&accelerometer, acceReading); + if (isStationary) checkResolution(&accelerometer, acceReading); } @@ -249,6 +250,7 @@ void SensorSlotClass::checkDiff(qreal diff, qreal resolution, QString msg){ if (qAbs(diff)<resolution || qAbs(diff)>resolutionMax){ QString num; + resolutionString.append("\n"); resolutionString.append("accelerometer:"); resolutionString.append(msg); num.setNum(resolution); @@ -256,7 +258,6 @@ void SensorSlotClass::checkDiff(qreal diff, qreal resolution, QString msg){ resolutionString.append("!="); num.setNum(qAbs(diff)); resolutionString.append(num); - resolutionString.append("\n"); } } @@ -530,7 +531,7 @@ void test_manual::testOrientation() for (; counter<7; counter++){ qDebug()<<"Put the device in following position, try to preserve compass direction:\n"; - if (counter==4) qDebug()<<"Put the device on the table on stationary position!!!!:\n"; + if (counter==4) qDebug()<<"Put the device on the table on stationary position!:\n"; QOrientationReading::Orientation o1 = tests::orientation[counter%6]; tests::drawDevice(o1); tests::pressAnyKey(); @@ -626,6 +627,15 @@ void test_manual::testOrientation() // qDebug()<<" rotation = y "<<rot_y[i-1]; // qDebug()<<" rotation = z "<<rot_z[i-1]; // } + + + if (counter==4){ + isStationary = true; + qDebug()<<"Keep the device on the table on stationary position!:\n"; + qDebug()<<"Test continues after a while"; + QTest::qWait(2000); // DO NOT REMOVE - does not work without this! + isStationary = false; + } } |