-rw-r--r-- | libopie2/opiecore/device/odevice.h | 1 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 28 |
2 files changed, 22 insertions, 7 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 96a41fc..c434216 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -73,2 +73,3 @@ enum OModel { | |||
73 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), | 73 | Model_Jornada_56x = ( Model_Jornada | 0x000001 ), |
74 | Model_Jornada_720 = ( Model_Jornada | 0x000002 ), | ||
74 | 75 | ||
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index 7d080ba..c7ed4bc 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp | |||
@@ -110,3 +110,3 @@ struct j_button jornada56x_buttons [] = { | |||
110 | 110 | ||
111 | void Jornada::init(const QString&) | 111 | void Jornada::init(const QString& cpu_info) |
112 | { | 112 | { |
@@ -114,5 +114,19 @@ void Jornada::init(const QString&) | |||
114 | d->m_vendor = Vendor_HP; | 114 | d->m_vendor = Vendor_HP; |
115 | d->m_modelstr = "Jornada 56x"; | 115 | |
116 | d->m_model = Model_Jornada_56x; | 116 | QString model; |
117 | d->m_rotation = Rot0; | 117 | int loc = cpu_info.find( ":" ); |
118 | if ( loc != -1 ) | ||
119 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); | ||
120 | else | ||
121 | model = cpu_info; | ||
122 | |||
123 | if ( model == "HP Jornada 56x" ) { | ||
124 | d->m_modelstr = "Jornada 56x"; | ||
125 | d->m_model = Model_Jornada_56x; | ||
126 | } else if ( model == "HP Jornada 720" ) { | ||
127 | d->m_modelstr = "Jornada 720"; | ||
128 | d->m_model = Model_Jornada_720; | ||
129 | } | ||
130 | |||
131 | d->m_rotation = Rot0; //all Jornadas need this rotation | ||
118 | //Distribution detecting code is now in base class | 132 | //Distribution detecting code is now in base class |
@@ -162,5 +176,5 @@ bool Jornada::setDisplayBrightness( int bright ) | |||
162 | if ( !bright ) | 176 | if ( !bright ) |
163 | cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/sa1100fb/power"); | 177 | cmdline = QString::fromLatin1( "echo 4 > /sys/class/backlight/*/power"); |
164 | else | 178 | else |
165 | cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/sa1100fb/power; echo %1 > /sys/class/backlight/sa1100fb/brightness" ).arg( bright ); | 179 | cmdline = QString::fromLatin1( "echo 0 > /sys/class/backlight/*/power; echo %1 > /sys/class/backlight/*/brightness" ).arg( bright ); |
166 | 180 | ||
@@ -177,3 +191,3 @@ bool Jornada::setDisplayStatus ( bool on ) | |||
177 | 191 | ||
178 | QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/sa1100fb/power; echo %2 > /sys/class/backlight/sa1100fb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); | 192 | QString cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/*/power; echo %2 > /sys/class/backlight/*/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); |
179 | 193 | ||