summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index bc09e92..82a0099 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1557,7 +1557,7 @@ bool Zaurus::isZaurus()
- if ( model == "Sharp-Collie"
- || model == "Collie"
+ if ( model == "Sharp-Collie"
+ || model == "Collie"
|| model == "SHARP Corgi"
- || model == "SHARP Shepherd"
- || model == "SHARP Poodle"
+ || model == "SHARP Shepherd"
+ || model == "SHARP Poodle"
|| model == "SHARP Husky"
@@ -1580,6 +1580,6 @@ void Zaurus::init ( )
- // It isn't a good idea to check the system configuration to
- // detect the distribution !
+ // It isn't a good idea to check the system configuration to
+ // detect the distribution !
// Otherwise it may happen that any other distribution is detected as openzaurus, just
- // because it uses a jffs2 filesystem..
+ // because it uses a jffs2 filesystem..
// (eilers)
@@ -1698,5 +1698,5 @@ void Zaurus::initButtons ( )
b. setPixmap ( Resource::loadPixmap ( zb-> pix ));
- b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ),
+ b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ),
zb-> fpressedaction ));
- b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ),
+ b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ),
zb-> fheldaction ));
@@ -1709,3 +1709,3 @@ void Zaurus::initButtons ( )
QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
- connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )),
+ connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )),
this, SLOT( systemMessage ( const QCString &, const QByteArray & )));
@@ -1966,2 +1966,3 @@ bool Zaurus::setDisplayBrightness ( int bright )
{
+ //qDebug( "Zaurus::setDisplayBrightness( %d )", bright );
bool res = false;
@@ -1976,2 +1977,3 @@ bool Zaurus::setDisplayBrightness ( int bright )
{
+ //qDebug( "using special treatment for devices with the corgi backlight interface" );
// special treatment for devices with the corgi backlight interface
@@ -1979,5 +1981,5 @@ bool Zaurus::setDisplayBrightness ( int bright )
{
- if ( bright > 0x11 ) bright = 0x11;
+ int value = ( bright == 1 ) ? 1 : bright * ( 17.0 / 255.0 );
char writeCommand[100];
- const int count = sprintf( writeCommand, "0x%x\n", bright );
+ const int count = sprintf( writeCommand, "0x%x\n", value );
res = ( ::write ( fd, writeCommand, count ) != -1 );