qtmobility/plugins/sensors/maemo6/maemo6tapsensor.cpp
changeset 11 06b8e2af4411
parent 8 71781823f776
child 14 6fbed849b4f4
equal deleted inserted replaced
8:71781823f776 11:06b8e2af4411
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the Qt Mobility Components.
     7 ** This file is part of the Qt Mobility Components.
     8 **
     8 **
    39 **
    39 **
    40 ****************************************************************************/
    40 ****************************************************************************/
    41 
    41 
    42 #include "maemo6tapsensor.h"
    42 #include "maemo6tapsensor.h"
    43 
    43 
    44 #include "sensord/filters/tapdata.h"
    44 #include <tapdata.h>
    45 
    45 
    46 const char *maemo6tapsensor::id("maemo6.tapsensor");
    46 const char *maemo6tapsensor::id("maemo6.tapsensor");
    47 bool maemo6tapsensor::m_initDone = false;
    47 bool maemo6tapsensor::m_initDone = false;
    48 
    48 
    49 maemo6tapsensor::maemo6tapsensor(QSensor *sensor)
    49 maemo6tapsensor::maemo6tapsensor(QSensor *sensor)
    99         case TapData::BackFace:  o = QTapReading::Y_Neg;     break;
    99         case TapData::BackFace:  o = QTapReading::Y_Neg;     break;
   100         default:                 o = QTapReading::Undefined;
   100         default:                 o = QTapReading::Undefined;
   101     }
   101     }
   102     m_reading.setTapDirection(o);
   102     m_reading.setTapDirection(o);
   103 
   103 
   104     //m_reading.setTimestamp(data.timestamp());
   104     m_reading.setTimestamp(data.tapData().timestamp_);
   105     m_reading.setTimestamp(createTimestamp()); //TODO: use correct timestamp
       
   106     newReadingAvailable();
   105     newReadingAvailable();
   107 }
   106 }