author | chicken <chicken> | 2004-05-30 09:37:02 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-05-30 09:37:02 (UTC) |
commit | 5bd7c2eee656e8f30635921f15770bd4a43da9e6 (patch) (side-by-side diff) | |
tree | 727cbc6c13b4f6d412bfe8706acca229fa047366 /libopie2 | |
parent | 9f56a986d7d509ec0b75b5d039efa22dbaec2c03 (diff) | |
download | opie-5bd7c2eee656e8f30635921f15770bd4a43da9e6.zip opie-5bd7c2eee656e8f30635921f15770bd4a43da9e6.tar.gz opie-5bd7c2eee656e8f30635921f15770bd4a43da9e6.tar.bz2 |
LCD/Backlight control has changed a bit
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index 759d6a3..1f69326 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp @@ -154,66 +154,66 @@ void Jornada::initButtons() QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } int Jornada::displayBrightnessResolution() const { return 255; } bool Jornada::setDisplayBrightness( int bright ) { bool res = false; if ( bright > 255 ) bright = 255; if ( bright < 0 ) bright = 0; QString cmdline; int value = 255 - bright; if ( !bright ) - cmdline = QString().sprintf( "echo 0 > /sys/class/backlight/sa1100fb/power"); + cmdline = QString().sprintf( "echo 4 > /sys/class/backlight/sa1100fb/power"); else - cmdline = QString().sprintf( "echo 1 > /sys/class/backlight/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/brightness", value ); + cmdline = QString().sprintf( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/brightness", value ); res = ( ::system( (const char*) cmdline ) == 0 ); return res; } bool Jornada::suspend( ) { qDebug("ODevice::suspend"); if ( !isQWS( ) ) // only qwsserver is allowed to suspend return false; if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices return false; bool res = false; ODevice::sendSuspendmsg(); struct timeval tvs; ::gettimeofday ( &tvs, 0 ); ::sync(); // flush fs caches res = ( ::system ( "apm --suspend" ) == 0 ); return res; } bool Jornada::setDisplayStatus ( bool on ) { bool res = false; - QString cmdline = QString().sprintf( "echo %d > /sys/class/lcd/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/power", on ? "1" : "0", on ? "1" : "0" ); + QString cmdline = QString().sprintf( "echo %d > /sys/class/lcd/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/power", on ? "0" : "4", on? "0" : "4" ); res = ( ::system( (const char*) cmdline ) == 0 ); return res; } |