author | zecke <zecke> | 2005-11-02 20:08:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-11-02 20:08:42 (UTC) |
commit | 562ff5c89ae1da92172a086afc8c3ffb7eec23bd (patch) (side-by-side diff) | |
tree | 1b95768a3215b4f74b6a2723cd4fa093fcd46d17 | |
parent | 1c35276ae800e8adfcca2ddb010a0fe8080754bd (diff) | |
download | opie-562ff5c89ae1da92172a086afc8c3ffb7eec23bd.zip opie-562ff5c89ae1da92172a086afc8c3ffb7eec23bd.tar.gz opie-562ff5c89ae1da92172a086afc8c3ffb7eec23bd.tar.bz2 |
ODevice iPAQ h191x and MyPal Asus:
Patch by Pawel Kolodziejski to change the maximum brightnes
for H191x and Asus MyPAL.
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_mypal.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 2d734a4..5272a3c 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -392,33 +392,33 @@ bool iPAQ::setDisplayBrightness ( int bright ) } int iPAQ::displayBrightnessResolution() const { switch ( model()) { case Model_iPAQ_H31xx: case Model_iPAQ_H36xx: case Model_iPAQ_H37xx: return 128; // really 256, but >128 could damage the LCD case Model_iPAQ_H38xx: case Model_iPAQ_H39xx: return 64; case Model_iPAQ_H5xxx: return 255; case Model_iPAQ_H191x: - return 183; + return 7; case Model_iPAQ_H1940: return 44; default: return 2; } } bool iPAQ::setDisplayStatus ( bool on ) { bool res = false; QString cmdline; if ( model() == Model_iPAQ_H191x ) { cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/pxafb/power; echo %2 > /sys/class/backlight/pxafb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); } else { diff --git a/libopie2/opiecore/device/odevice_mypal.cpp b/libopie2/opiecore/device/odevice_mypal.cpp index 45c70ae..da0272e 100644 --- a/libopie2/opiecore/device/odevice_mypal.cpp +++ b/libopie2/opiecore/device/odevice_mypal.cpp @@ -188,60 +188,60 @@ void MyPal::timerEvent ( QTimerEvent * ) void MyPal::playAlarmSound() { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); if(!snd.isFinished()) return; changeMixerForAlarm(0, "/dev/sound/mixer", &snd ); snd. play(); #endif } bool MyPal::setDisplayBrightness ( int bright ) { bool res = false; - if ( bright > 220 ) - bright = 220; + if ( bright > 255 ) + bright = 255; if ( bright < 0 ) bright = 0; QString cmdline; switch ( model()) { case Model_MyPal_716: if ( !bright ) cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/pxafb/power"); else cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/pxafb/power; echo %1 > /sys/class/backlight/pxafb/brightness" ).arg( bright ); // No Global::shellQuote as we gurantee it to be sane res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); break; default: res = OAbstractMobileDevice::setDisplayBrightness(bright); } return res; } int MyPal::displayBrightnessResolution() const { switch ( model()) { case Model_MyPal_716: - return 220; + return 7; default: return OAbstractMobileDevice::displayBrightnessResolution(); } } bool MyPal::setDisplayStatus ( bool on ) { bool res = false; QString cmdline; if ( model() == Model_MyPal_716 ) { cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/pxafb/power; echo %2 > /sys/class/backlight/pxafb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); } else { return OAbstractMobileDevice::setDisplayStatus(on); } |