author | zecke <zecke> | 2005-10-07 18:21:10 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-10-07 18:21:10 (UTC) |
commit | d5beae7038e36633480cc3e17134a85b6d68fbc7 (patch) (unidiff) | |
tree | 632f5ae52296438e1ff6b4a6c669395da912a3bb | |
parent | 0bad2116a1ceed19956b94889cb034781f35146d (diff) | |
download | opie-d5beae7038e36633480cc3e17134a85b6d68fbc7.zip opie-d5beae7038e36633480cc3e17134a85b6d68fbc7.tar.gz opie-d5beae7038e36633480cc3e17134a85b6d68fbc7.tar.bz2 |
libopie2/opiecore/device/odevice_ipaq.cpp:
-make it compile. This line should have been H1940 in the
patch. Now I even compiled libopiecore before comitting ;)
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 52da2d9..2d734a4 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -377,65 +377,65 @@ bool iPAQ::setDisplayBrightness ( int bright ) | |||
377 | cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/pxafb/power; echo %1 > /sys/class/backlight/pxafb/brightness" ).arg( bright ); | 377 | cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/pxafb/power; echo %1 > /sys/class/backlight/pxafb/brightness" ).arg( bright ); |
378 | // No Global::shellQuote as we gurantee it to be sane | 378 | // No Global::shellQuote as we gurantee it to be sane |
379 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); | 379 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); |
380 | break; | 380 | break; |
381 | default: | 381 | default: |
382 | if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { | 382 | if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { |
383 | FLITE_IN bl; | 383 | FLITE_IN bl; |
384 | bl. mode = 1; | 384 | bl. mode = 1; |
385 | bl. pwr = bright ? 1 : 0; | 385 | bl. pwr = bright ? 1 : 0; |
386 | bl. brightness = ( bright * ( displayBrightnessResolution() - 1 ) + 127 ) / 255; | 386 | bl. brightness = ( bright * ( displayBrightnessResolution() - 1 ) + 127 ) / 255; |
387 | res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); | 387 | res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); |
388 | ::close ( fd ); | 388 | ::close ( fd ); |
389 | } | 389 | } |
390 | } | 390 | } |
391 | return res; | 391 | return res; |
392 | } | 392 | } |
393 | 393 | ||
394 | int iPAQ::displayBrightnessResolution() const | 394 | int iPAQ::displayBrightnessResolution() const |
395 | { | 395 | { |
396 | switch ( model()) { | 396 | switch ( model()) { |
397 | case Model_iPAQ_H31xx: | 397 | case Model_iPAQ_H31xx: |
398 | case Model_iPAQ_H36xx: | 398 | case Model_iPAQ_H36xx: |
399 | case Model_iPAQ_H37xx: | 399 | case Model_iPAQ_H37xx: |
400 | return 128; // really 256, but >128 could damage the LCD | 400 | return 128; // really 256, but >128 could damage the LCD |
401 | 401 | ||
402 | case Model_iPAQ_H38xx: | 402 | case Model_iPAQ_H38xx: |
403 | case Model_iPAQ_H39xx: | 403 | case Model_iPAQ_H39xx: |
404 | return 64; | 404 | return 64; |
405 | case Model_iPAQ_H5xxx: | 405 | case Model_iPAQ_H5xxx: |
406 | return 255; | 406 | return 255; |
407 | case Model_iPAQ_H191x: | 407 | case Model_iPAQ_H191x: |
408 | return 183; | 408 | return 183; |
409 | case Model_iPAQ_H191x: | 409 | case Model_iPAQ_H1940: |
410 | return 44; | 410 | return 44; |
411 | default: | 411 | default: |
412 | return 2; | 412 | return 2; |
413 | } | 413 | } |
414 | } | 414 | } |
415 | 415 | ||
416 | bool iPAQ::setDisplayStatus ( bool on ) | 416 | bool iPAQ::setDisplayStatus ( bool on ) |
417 | { | 417 | { |
418 | bool res = false; | 418 | bool res = false; |
419 | 419 | ||
420 | QString cmdline; | 420 | QString cmdline; |
421 | 421 | ||
422 | if ( model() == Model_iPAQ_H191x ) { | 422 | if ( model() == Model_iPAQ_H191x ) { |
423 | 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" ); | 423 | 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" ); |
424 | } else { | 424 | } else { |
425 | return OAbstractMobileDevice::setDisplayStatus(on); | 425 | return OAbstractMobileDevice::setDisplayStatus(on); |
426 | } | 426 | } |
427 | 427 | ||
428 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); | 428 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); |
429 | 429 | ||
430 | return res; | 430 | return res; |
431 | } | 431 | } |
432 | 432 | ||
433 | bool iPAQ::hasLightSensor() const | 433 | bool iPAQ::hasLightSensor() const |
434 | { | 434 | { |
435 | return true; | 435 | return true; |
436 | } | 436 | } |
437 | 437 | ||
438 | int iPAQ::readLightSensor() | 438 | int iPAQ::readLightSensor() |
439 | { | 439 | { |
440 | int fd; | 440 | int fd; |
441 | int val = -1; | 441 | int val = -1; |