-rw-r--r-- | libopie/odevice.cpp | 12 | ||||
-rw-r--r-- | libopie/odevice.h | 1 |
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: | |||
86 | 86 | ||
87 | virtual bool hasLightSensor ( ) const; | 87 | virtual bool hasLightSensor ( ) const; |
88 | virtual int readLightSensor ( ); | 88 | virtual int readLightSensor ( ); |
89 | virtual int lightSensorResolution ( ) const; | ||
89 | 90 | ||
90 | //virtual QValueList <int> keyList ( ) const; | 91 | //virtual QValueList <int> keyList ( ) const; |
91 | 92 | ||
@@ -369,6 +370,10 @@ int ODevice::readLightSensor ( ) | |||
369 | return -1; | 370 | return -1; |
370 | } | 371 | } |
371 | 372 | ||
373 | int ODevice::lightSensorResolution ( ) const | ||
374 | { | ||
375 | return 0; | ||
376 | } | ||
372 | 377 | ||
373 | //QValueList <int> ODevice::keyList ( ) const | 378 | //QValueList <int> ODevice::keyList ( ) const |
374 | //{ | 379 | //{ |
@@ -682,8 +687,7 @@ bool iPAQ::hasLightSensor ( ) const | |||
682 | { | 687 | { |
683 | return true; | 688 | return true; |
684 | } | 689 | } |
685 | #include <errno.h> | 690 | |
686 | #include <string.h> | ||
687 | int iPAQ::readLightSensor ( ) | 691 | int iPAQ::readLightSensor ( ) |
688 | { | 692 | { |
689 | int fd; | 693 | int fd; |
@@ -707,6 +711,10 @@ int iPAQ::readLightSensor ( ) | |||
707 | return val; | 711 | return val; |
708 | } | 712 | } |
709 | 713 | ||
714 | int iPAQ::lightSensorResolution ( ) const | ||
715 | { | ||
716 | return 256; | ||
717 | } | ||
710 | 718 | ||
711 | /************************************************** | 719 | /************************************************** |
712 | * | 720 | * |
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: | |||
135 | 135 | ||
136 | virtual bool hasLightSensor ( ) const; | 136 | virtual bool hasLightSensor ( ) const; |
137 | virtual int readLightSensor ( ); | 137 | virtual int readLightSensor ( ); |
138 | virtual int lightSensorResolution ( ) const; | ||
138 | 139 | ||
139 | //virtual QValueList <int> keyList ( ) const; | 140 | //virtual QValueList <int> keyList ( ) const; |
140 | }; | 141 | }; |