-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 22 |
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 | |||
@@ -172,12 +172,16 @@ bool Jornada::setDisplayBrightness( int bright ) | |||
172 | bright = 0; | 172 | bright = 0; |
173 | 173 | ||
174 | QString cmdline; | 174 | QString cmdline; |
175 | 175 | ||
176 | if ( !bright ) | 176 | if ( d->m_model == Model_Jornada_56x ) { |
177 | cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/*/power"); | 177 | if ( !bright ) |
178 | else | 178 | cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/sa1100fb/power"); |
179 | cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/*/power; echo %1 > /sys/class/backlight/*/brightness" ).arg( bright ); | 179 | else |
180 | cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/sa1100/power; echo %1 > /sys/class/backlight/sa1100/brightness" ).arg( bright ); | ||
181 | } else if ( d->m_model == Model_Jornada_720 ) { | ||
182 | cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/e1356fb/brightness" ).arg( bright ); | ||
183 | } | ||
180 | 184 | ||
181 | // No Global::shellQuote as we gurantee it to be sane | 185 | // No Global::shellQuote as we gurantee it to be sane |
182 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); | 186 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); |
183 | 187 | ||
@@ -187,10 +191,16 @@ bool Jornada::setDisplayBrightness( int bright ) | |||
187 | 191 | ||
188 | bool Jornada::setDisplayStatus ( bool on ) | 192 | bool Jornada::setDisplayStatus ( bool on ) |
189 | { | 193 | { |
190 | bool res = false; | 194 | bool res = false; |
191 | 195 | ||
192 | QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/*/power; echo %2 > /sys/class/backlight/*/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); | 196 | QString cmdline; |
197 | |||
198 | if ( d->m_model == Model_Jornada_56x ) { | ||
199 | QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/*/power; echo %2 > /sys/class/backlight/*/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); | ||
200 | } else if ( d->m_model == Model_Jornada_720 ) { | ||
201 | QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/e1356fb/power").arg( on ? "0" : "4" ); | ||
202 | } | ||
193 | 203 | ||
194 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); | 204 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); |
195 | 205 | ||
196 | return res; | 206 | return res; |