qtmobility/plugins/sensors/maemo6/maemo6proximitysensor.cpp
changeset 8 71781823f776
parent 5 453da2cfceef
child 11 06b8e2af4411
equal deleted inserted replaced
5:453da2cfceef 8:71781823f776
    55         if (m_sensorInterface)
    55         if (m_sensorInterface)
    56             QObject::connect(static_cast<ProximitySensorChannelInterface*>(m_sensorInterface), SIGNAL(dataAvailable(const int&)), this, SLOT(slotDataAvailable(const int&)));
    56             QObject::connect(static_cast<ProximitySensorChannelInterface*>(m_sensorInterface), SIGNAL(dataAvailable(const int&)), this, SLOT(slotDataAvailable(const int&)));
    57         else
    57         else
    58             qWarning() << "Unable to initialize proximity sensor.";
    58             qWarning() << "Unable to initialize proximity sensor.";
    59 
    59 
    60         // close definition in meters - may be used as metadata even the sensor gives true/false values 
    60         // metadata
    61         addOutputRange(0, 1, 1);
    61         addDataRate(2, 2); // 2Hz
       
    62         sensor->setDataRate(2);
       
    63         addOutputRange(0, 1, 1); // close definition in meters - may be used as metadata even the sensor gives true/false values
    62         setDescription(QLatin1String("Measures if a living object is in proximity or not"));
    64         setDescription(QLatin1String("Measures if a living object is in proximity or not"));
    63 
    65 
    64         m_initDone = true;
    66         m_initDone = true;
    65     }
    67     }
    66 }
    68 }