-rw-r--r-- | libopie/odevice.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 160568b..f808960 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -557,4 +557,6 @@ bool ODevice::setDisplayStatus ( bool on ) | |||
557 | /** | 557 | /** |
558 | * This sets the display brightness | 558 | * This sets the display brightness |
559 | * | ||
560 | * @param p The brightness to be set on a scale from 0 to 255 | ||
559 | * @return success or failure | 561 | * @return success or failure |
560 | */ | 562 | */ |
@@ -566,5 +568,6 @@ bool ODevice::setDisplayBrightness ( int p) | |||
566 | 568 | ||
567 | /** | 569 | /** |
568 | * @return return the max value for the brightness settings slider | 570 | * @return returns the number of steppings on the brightness slider |
571 | * in the Light-'n-Power settings. | ||
569 | */ | 572 | */ |
570 | int ODevice::displayBrightnessResolution ( ) const | 573 | int ODevice::displayBrightnessResolution ( ) const |
@@ -575,4 +578,5 @@ int ODevice::displayBrightnessResolution ( ) const | |||
575 | /** | 578 | /** |
576 | * This sets the display contrast | 579 | * This sets the display contrast |
580 | * @param p The contrast to be set on a scale from 0 to 255 | ||
577 | * @return success or failure | 581 | * @return success or failure |
578 | */ | 582 | */ |
@@ -2071,5 +2075,5 @@ bool Ramses::setDisplayContrast(int contr) | |||
2071 | int fd; | 2075 | int fd; |
2072 | 2076 | ||
2073 | // pwm0 contrast: 35 steps 65..100 (dunkel->hell) | 2077 | // pwm0 contrast: 20 steps 79..90 (dunkel->hell) |
2074 | 2078 | ||
2075 | if (contr > 255 ) | 2079 | if (contr > 255 ) |
@@ -2077,5 +2081,5 @@ bool Ramses::setDisplayContrast(int contr) | |||
2077 | if (contr < 0) | 2081 | if (contr < 0) |
2078 | contr = 0; | 2082 | contr = 0; |
2079 | contr = 65 + (contr * 350 / 255); | 2083 | contr = 90 - (contr * 20 / 255); |
2080 | 2084 | ||
2081 | if ((fd = ::open("/proc/sys/board/pwm0", O_WRONLY)) >= 0) { | 2085 | if ((fd = ::open("/proc/sys/board/pwm0", O_WRONLY)) >= 0) { |
@@ -2095,4 +2099,4 @@ bool Ramses::setDisplayContrast(int contr) | |||
2095 | int Ramses::displayContrastResolution() const | 2099 | int Ramses::displayContrastResolution() const |
2096 | { | 2100 | { |
2097 | return 32; | 2101 | return 20; |
2098 | } | 2102 | } |