summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_jornada.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp
index c7ed4bc..272109b 100644
--- a/libopie2/opiecore/device/odevice_jornada.cpp
+++ b/libopie2/opiecore/device/odevice_jornada.cpp
@@ -174,8 +174,12 @@ bool Jornada::setDisplayBrightness( int bright )
QString cmdline;
- if ( !bright )
- cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/*/power");
- else
- cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/*/power; echo %1 > /sys/class/backlight/*/brightness" ).arg( bright );
+ if ( d->m_model == Model_Jornada_56x ) {
+ if ( !bright )
+ cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/sa1100fb/power");
+ else
+ cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/sa1100/power; echo %1 > /sys/class/backlight/sa1100/brightness" ).arg( bright );
+ } else if ( d->m_model == Model_Jornada_720 ) {
+ cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/e1356fb/brightness" ).arg( bright );
+ }
// No Global::shellQuote as we gurantee it to be sane
@@ -189,6 +193,12 @@ bool Jornada::setDisplayStatus ( bool on )
{
bool res = false;
-
- QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/*/power; echo %2 > /sys/class/backlight/*/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" );
+
+ QString cmdline;
+
+ if ( d->m_model == Model_Jornada_56x ) {
+ QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/*/power; echo %2 > /sys/class/backlight/*/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" );
+ } else if ( d->m_model == Model_Jornada_720 ) {
+ QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/e1356fb/power").arg( on ? "0" : "4" );
+ }
res = ( ::system( QFile::encodeName(cmdline) ) == 0 );