author | schurig <schurig> | 2003-06-06 07:43:08 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-06 07:43:08 (UTC) |
commit | e7d5436f3379f45d9c165a2826b1f4ae5adaeea4 (patch) (side-by-side diff) | |
tree | c05f10f573167fd2a0289715a6e7272cfa45fad4 /libopie/odevice.cpp | |
parent | 4f987e0199430d04a4ac86007f0a79c631c2e611 (diff) | |
download | opie-e7d5436f3379f45d9c165a2826b1f4ae5adaeea4.zip opie-e7d5436f3379f45d9c165a2826b1f4ae5adaeea4.tar.gz opie-e7d5436f3379f45d9c165a2826b1f4ae5adaeea4.tar.bz2 |
ramses stuff
better doc-strings setDisplayBrightness(), setDisplayContrast() and their
...Resolution() friends
-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 ) /** * This sets the display brightness + * + * @param p The brightness to be set on a scale from 0 to 255 * @return success or failure */ @@ -566,5 +568,6 @@ bool ODevice::setDisplayBrightness ( int p) /** - * @return return the max value for the brightness settings slider + * @return returns the number of steppings on the brightness slider + * in the Light-'n-Power settings. */ int ODevice::displayBrightnessResolution ( ) const @@ -575,4 +578,5 @@ int ODevice::displayBrightnessResolution ( ) const /** * This sets the display contrast + * @param p The contrast to be set on a scale from 0 to 255 * @return success or failure */ @@ -2071,5 +2075,5 @@ bool Ramses::setDisplayContrast(int contr) int fd; - // pwm0 contrast: 35 steps 65..100 (dunkel->hell) + // pwm0 contrast: 20 steps 79..90 (dunkel->hell) if (contr > 255 ) @@ -2077,5 +2081,5 @@ bool Ramses::setDisplayContrast(int contr) if (contr < 0) contr = 0; - contr = 65 + (contr * 350 / 255); + contr = 90 - (contr * 20 / 255); if ((fd = ::open("/proc/sys/board/pwm0", O_WRONLY)) >= 0) { @@ -2095,4 +2099,4 @@ bool Ramses::setDisplayContrast(int contr) int Ramses::displayContrastResolution() const { - return 32; + return 20; } |