summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_jornada.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp
index bcde425..3acba03 100644
--- a/libopie2/opiecore/device/odevice_jornada.cpp
+++ b/libopie2/opiecore/device/odevice_jornada.cpp
@@ -137,49 +137,54 @@ void Jornada::initButtons()
if ( d->m_buttons )
return;
d->m_buttons = new QValueList <ODeviceButton>;
for ( uint i = 0; i < ( sizeof( jornada56x_buttons ) / sizeof( j_button )); i++ ) {
j_button *ib = jornada56x_buttons + i;
ODeviceButton b;
if (( ib->model & d->m_model ) == d->m_model ) {
b. setKeycode ( ib->code );
b. setUserText ( QObject::tr ( "Button", ib->utext ));
b. setPixmap ( Resource::loadPixmap ( ib->pix ));
b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
d->m_buttons->append ( b );
}
}
reloadButtonMapping();
}
int Jornada::displayBrightnessResolution() const
{
- return 255;
+ if ( d->m_model == Model_Jornada_56x )
+ return 190;
+ else if (d->m_model == Model_Jornada_720 )
+ return 255;
+ else
+ return 0;
}
bool Jornada::setDisplayBrightness( int bright )
{
bool res = false;
if ( bright > 255 )
bright = 255;
if ( bright < 0 )
bright = 0;
QString cmdline;
if ( d->m_model == Model_Jornada_56x ) {
if ( !bright )
cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/sa1100fb/power");
else
cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %1 > /sys/class/backlight/sa1100fb/brightness" ).arg( bright );
} else if ( d->m_model == Model_Jornada_720 ) {
cmdline = QString::fromLatin1( "echo %1 > /sys/class/backlight/e1356fb/brightness" ).arg( bright );
}
// No Global::shellQuote as we gurantee it to be sane