qtmobility/plugins/sensors/dummy/dummylightsensor.cpp
changeset 11 06b8e2af4411
parent 1 2b40d63a9c3d
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 **
    47 
    47 
    48 dummylightsensor::dummylightsensor(QSensor *sensor)
    48 dummylightsensor::dummylightsensor(QSensor *sensor)
    49     : dummycommon(sensor)
    49     : dummycommon(sensor)
    50 {
    50 {
    51     setReading<QAmbientLightReading>(&m_reading);
    51     setReading<QAmbientLightReading>(&m_reading);
       
    52     addDataRate(100,100);
       
    53     sensor->setDataRate(100);
    52 }
    54 }
    53 
    55 
    54 void dummylightsensor::poll()
    56 void dummylightsensor::poll()
    55 {
    57 {
    56     m_reading.setTimestamp(getTimestamp());
    58     m_reading.setTimestamp(getTimestamp());