summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-29 15:50:21 (UTC)
committer sandman <sandman>2002-10-29 15:50:21 (UTC)
commitbad66a2ea2aea8bec1c7895b0e1a461e2f4859c2 (patch) (side-by-side diff)
tree6a39587f58ff01456fff0a6d17d5564d28bb4f4f
parent6224d462ef211b3b4cffa42d4a7f261caa92834b (diff)
downloadopie-bad66a2ea2aea8bec1c7895b0e1a461e2f4859c2.zip
opie-bad66a2ea2aea8bec1c7895b0e1a461e2f4859c2.tar.gz
opie-bad66a2ea2aea8bec1c7895b0e1a461e2f4859c2.tar.bz2
added lightSensorResolution() to get the hardware resolution of the light
sensor
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp12
-rw-r--r--libopie/odevice.h1
2 files changed, 11 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 9f64fc0..4c49c4f 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -86,6 +86,7 @@ public:
virtual bool hasLightSensor ( ) const;
virtual int readLightSensor ( );
+ virtual int lightSensorResolution ( ) const;
//virtual QValueList <int> keyList ( ) const;
@@ -369,6 +370,10 @@ int ODevice::readLightSensor ( )
return -1;
}
+int ODevice::lightSensorResolution ( ) const
+{
+ return 0;
+}
//QValueList <int> ODevice::keyList ( ) const
//{
@@ -682,8 +687,7 @@ bool iPAQ::hasLightSensor ( ) const
{
return true;
}
-#include <errno.h>
-#include <string.h>
+
int iPAQ::readLightSensor ( )
{
int fd;
@@ -707,6 +711,10 @@ int iPAQ::readLightSensor ( )
return val;
}
+int iPAQ::lightSensorResolution ( ) const
+{
+ return 256;
+}
/**************************************************
*
diff --git a/libopie/odevice.h b/libopie/odevice.h
index be2a9c7..e07b91c 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -135,6 +135,7 @@ public:
virtual bool hasLightSensor ( ) const;
virtual int readLightSensor ( );
+ virtual int lightSensorResolution ( ) const;
//virtual QValueList <int> keyList ( ) const;
};