author | chicken <chicken> | 2004-10-11 13:42:02 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-10-11 13:42:02 (UTC) |
commit | d3da21c01659c68dc2cf1dfff1608649977b6e05 (patch) (unidiff) | |
tree | 934a04259e38827a48b9e21bfffabd47cb816ca0 | |
parent | 9c2ff4fd80562f0f92a2662fb2fa95b88284b9b4 (diff) | |
download | opie-d3da21c01659c68dc2cf1dfff1608649977b6e05.zip opie-d3da21c01659c68dc2cf1dfff1608649977b6e05.tar.gz opie-d3da21c01659c68dc2cf1dfff1608649977b6e05.tar.bz2 |
remove jornada 56x brightness hack
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index 60736a1..2cab0c8 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp | |||
@@ -149,37 +149,36 @@ int Jornada::displayBrightnessResolution() const | |||
149 | { | 149 | { |
150 | return 255; | 150 | return 255; |
151 | } | 151 | } |
152 | 152 | ||
153 | 153 | ||
154 | bool Jornada::setDisplayBrightness( int bright ) | 154 | bool Jornada::setDisplayBrightness( int bright ) |
155 | { | 155 | { |
156 | bool res = false; | 156 | bool res = false; |
157 | 157 | ||
158 | if ( bright > 255 ) | 158 | if ( bright > 255 ) |
159 | bright = 255; | 159 | bright = 255; |
160 | if ( bright < 0 ) | 160 | if ( bright < 0 ) |
161 | bright = 0; | 161 | bright = 0; |
162 | 162 | ||
163 | QString cmdline; | 163 | QString cmdline; |
164 | 164 | ||
165 | int value = 255 - bright; | ||
166 | if ( !bright ) | 165 | if ( !bright ) |
167 | cmdline = QString().sprintf( "echo 4 > /sys/class/backlight/sa1100fb/power"); | 166 | cmdline = QString().sprintf( "echo 4 > /sys/class/backlight/sa1100fb/power"); |
168 | else | 167 | else |
169 | cmdline = QString().sprintf( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/brightness", value ); | 168 | cmdline = QString().sprintf( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %d > /sys/class/backlight/sa1100fb/brightness", bright ); |
170 | 169 | ||
171 | res = ( ::system( (const char*) cmdline ) == 0 ); | 170 | res = ( ::system( (const char*) cmdline ) == 0 ); |
172 | 171 | ||
173 | return res; | 172 | return res; |
174 | } | 173 | } |
175 | 174 | ||
176 | 175 | ||
177 | bool Jornada::suspend( ) | 176 | bool Jornada::suspend( ) |
178 | { | 177 | { |
179 | qDebug("ODevice::suspend"); | 178 | qDebug("ODevice::suspend"); |
180 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 179 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
181 | return false; | 180 | return false; |
182 | 181 | ||
183 | if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices | 182 | if ( d->m_model == Model_Unknown ) // better don't suspend in qvfb / on unkown devices |
184 | return false; | 183 | return false; |
185 | 184 | ||