summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_mypal.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/device/odevice_mypal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_mypal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_mypal.cpp b/libopie2/opiecore/device/odevice_mypal.cpp
index 45c70ae..da0272e 100644
--- a/libopie2/opiecore/device/odevice_mypal.cpp
+++ b/libopie2/opiecore/device/odevice_mypal.cpp
@@ -180,73 +180,73 @@ void MyPal::timerEvent ( QTimerEvent * )
{
killTimer ( m_power_timer );
m_power_timer = 0;
QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false );
QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false );
}
void MyPal::playAlarmSound()
{
#ifndef QT_NO_SOUND
static Sound snd ( "alarm" );
if(!snd.isFinished())
return;
changeMixerForAlarm(0, "/dev/sound/mixer", &snd );
snd. play();
#endif
}
bool MyPal::setDisplayBrightness ( int bright )
{
bool res = false;
- if ( bright > 220 )
- bright = 220;
+ if ( bright > 255 )
+ bright = 255;
if ( bright < 0 )
bright = 0;
QString cmdline;
switch ( model()) {
case Model_MyPal_716:
if ( !bright )
cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/pxafb/power");
else
cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/pxafb/power; echo %1 > /sys/class/backlight/pxafb/brightness" ).arg( bright );
// No Global::shellQuote as we gurantee it to be sane
res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
break;
default:
res = OAbstractMobileDevice::setDisplayBrightness(bright);
}
return res;
}
int MyPal::displayBrightnessResolution() const
{
switch ( model()) {
case Model_MyPal_716:
- return 220;
+ return 7;
default:
return OAbstractMobileDevice::displayBrightnessResolution();
}
}
bool MyPal::setDisplayStatus ( bool on )
{
bool res = false;
QString cmdline;
if ( model() == Model_MyPal_716 ) {
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" );
} else {
return OAbstractMobileDevice::setDisplayStatus(on);
}
res = ( ::system( QFile::encodeName(cmdline) ) == 0 );
return res;
}