--- a/plugins/sensors/maemo6/maemo6sensorbase.cpp Fri Sep 17 08:34:34 2010 +0300
+++ b/plugins/sensors/maemo6/maemo6sensorbase.cpp Mon Oct 04 01:37:06 2010 +0300
@@ -91,3 +91,16 @@
if (m_sensorInterface)
m_sensorInterface->stop();
}
+
+
+void maemo6sensorbase::setRanges(qreal correctionFactor){
+ int l = m_sensorInterface->getAvailableDataRanges().size();
+
+ for (int i=0; i<l; i++){
+ qreal rangeMin = ((DataRange)(m_sensorInterface->getAvailableDataRanges().at(i))).min * correctionFactor;
+ qreal rangeMax =((DataRange)(m_sensorInterface->getAvailableDataRanges().at(i))).max * correctionFactor;
+ qreal resolution = ((DataRange)(m_sensorInterface->getAvailableDataRanges().at(i))).resolution * correctionFactor;
+ addOutputRange(rangeMin, rangeMax, resolution);
+ }
+
+}