-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 32 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.h | 6 |
2 files changed, 5 insertions, 33 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index 34876da..335e0db 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp | |||
@@ -147,9 +147,4 @@ void SIMpad::initButtons() | |||
147 | return; | 147 | return; |
148 | 148 | ||
149 | if ( isQWS( ) ) { | ||
150 | addPreHandler(this); | ||
151 | } | ||
152 | |||
153 | |||
154 | d->m_buttons = new QValueList <ODeviceButton>; | 149 | d->m_buttons = new QValueList <ODeviceButton>; |
155 | 150 | ||
@@ -194,6 +189,5 @@ void SIMpad::initButtons() | |||
194 | 189 | ||
195 | //SIMpad touchscreen backlight strength control | 190 | //SIMpad touchscreen backlight strength control |
196 | #define SIMPAD_BACKLIGHT_CONTROL "/proc/driver/mq200/registers/PWM_CONTROL" | 191 | #define SIMPAD_BACKLIGHT_CONTROL "/proc/driver/mq200/backlight" |
197 | #define SIMPAD_BACKLIGHT_MASK 0x00a10044 | ||
198 | 192 | ||
199 | 193 | ||
@@ -300,11 +294,4 @@ bool SIMpad::setLedState ( OLed l, OLedState st ) | |||
300 | } | 294 | } |
301 | 295 | ||
302 | |||
303 | bool SIMpad::filter ( int /*unicode*/, int /*keycode*/, int /*modifiers*/, bool /*isPress*/, bool /*autoRepeat*/ ) | ||
304 | { | ||
305 | //TODO | ||
306 | return false; | ||
307 | } | ||
308 | |||
309 | void SIMpad::timerEvent ( QTimerEvent * ) | 296 | void SIMpad::timerEvent ( QTimerEvent * ) |
310 | { | 297 | { |
@@ -353,12 +340,4 @@ bool SIMpad::suspend() // Must override because SIMpad does NOT have apm | |||
353 | } | 340 | } |
354 | 341 | ||
355 | |||
356 | bool SIMpad::setSoftSuspend ( bool soft ) | ||
357 | { | ||
358 | qDebug( "ODevice for SIMpad: UNHANDLED setSoftSuspend(%s)", soft? "on" : "off" ); | ||
359 | return false; | ||
360 | } | ||
361 | |||
362 | |||
363 | bool SIMpad::setDisplayStatus ( bool on ) | 342 | bool SIMpad::setDisplayStatus ( bool on ) |
364 | { | 343 | { |
@@ -381,11 +360,6 @@ bool SIMpad::setDisplayBrightness ( int bright ) | |||
381 | 360 | ||
382 | if (( fd = ::open ( SIMPAD_BACKLIGHT_CONTROL, O_WRONLY )) >= 0 ) { | 361 | if (( fd = ::open ( SIMPAD_BACKLIGHT_CONTROL, O_WRONLY )) >= 0 ) { |
383 | int value = 255 - bright; | 362 | QCString str = QFile::encodeName( QString::number(bright)); |
384 | const int mask = SIMPAD_BACKLIGHT_MASK; | 363 | res = ( ::write(fd, str, str.length()) != -1 ); |
385 | value = value << 8; | ||
386 | value += mask; | ||
387 | char writeCommand[100]; | ||
388 | const int count = snprintf( writeCommand, sizeof(writeCommand), "0x%x\n", value ); | ||
389 | res = ( ::write ( fd, writeCommand, count ) != -1 ); | ||
390 | ::close ( fd ); | 364 | ::close ( fd ); |
391 | } | 365 | } |
diff --git a/libopie2/opiecore/device/odevice_simpad.h b/libopie2/opiecore/device/odevice_simpad.h index 6c42be7..dbcbbb4 100644 --- a/libopie2/opiecore/device/odevice_simpad.h +++ b/libopie2/opiecore/device/odevice_simpad.h | |||
@@ -40,5 +40,5 @@ namespace Core { | |||
40 | namespace Internal { | 40 | namespace Internal { |
41 | 41 | ||
42 | class SIMpad : public ODevice, public QWSServer::KeyboardFilter | 42 | class SIMpad : public ODevice |
43 | { | 43 | { |
44 | protected: | 44 | protected: |
@@ -47,5 +47,4 @@ class SIMpad : public ODevice, public QWSServer::KeyboardFilter | |||
47 | 47 | ||
48 | public: | 48 | public: |
49 | virtual bool setSoftSuspend( bool soft ); | ||
50 | virtual bool suspend(); | 49 | virtual bool suspend(); |
51 | 50 | ||
@@ -61,6 +60,5 @@ class SIMpad : public ODevice, public QWSServer::KeyboardFilter | |||
61 | virtual bool setLedState( OLed led, OLedState st ); | 60 | virtual bool setLedState( OLed led, OLedState st ); |
62 | 61 | ||
63 | protected: | 62 | protected: |
64 | virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | ||
65 | virtual void timerEvent( QTimerEvent *te ); | 63 | virtual void timerEvent( QTimerEvent *te ); |
66 | 64 | ||