summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-05-23 20:39:17 (UTC)
committer mickeyl <mickeyl>2003-05-23 20:39:17 (UTC)
commit0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (patch) (side-by-side diff)
treed3ca4e58beec5121ea2f7c02df1ac689bdb06be3
parent165a62b3ca9cc8e2c3c66845f465a38413fa60d9 (diff)
downloadopie-0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e.zip
opie-0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e.tar.gz
opie-0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e.tar.bz2
fix default rotation and direction for SIMpad
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 02f13b5..2873407 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -1468,97 +1468,100 @@ bool Zaurus::setSoftSuspend ( bool soft )
bool Zaurus::setDisplayBrightness ( int bright )
{
bool res = false;
int fd;
if ( bright > 255 )
bright = 255;
if ( bright < 0 )
bright = 0;
if (( fd = ::open ( "/dev/fl", O_WRONLY )) >= 0 ) {
int bl = ( bright * 4 + 127 ) / 255; // only 4 steps on zaurus
if ( bright && !bl )
bl = 1;
res = ( ::ioctl ( fd, FL_IOCTL_STEP_CONTRAST, bl ) == 0 );
::close ( fd );
}
return res;
}
int Zaurus::displayBrightnessResolution ( ) const
{
return 5;
}
/**************************************************
*
* SIMpad
*
**************************************************/
void SIMpad::init ( )
{
d-> m_vendorstr = "SIEMENS";
d-> m_vendor = Vendor_SIEMENS;
QFile f ( "/proc/hal/model" );
//TODO Implement model checking
//FIXME For now we assume an SL4
d-> m_modelstr = "SL4";
d-> m_model = Model_SIMpad_SL4;
switch ( d-> m_model ) {
default:
- d-> m_rotation = Rot270;
+ d-> m_rotation = Rot0;
+ d-> m_direction = CCW;
+ d-> m_holdtime = 1000; // 1000ms
+
break;
}
f. setName ( "/etc/familiar-version" );
if ( f. open ( IO_ReadOnly )) {
d-> m_systemstr = "Familiar";
d-> m_system = System_Familiar;
QTextStream ts ( &f );
d-> m_sysverstr = ts. readLine ( ). mid ( 10 );
f. close ( );
} else {
f. setName ( "/etc/oz_version" );
if ( f. open ( IO_ReadOnly )) {
d-> m_systemstr = "OpenEmbedded/SIMpad";
d-> m_system = System_OpenZaurus;
QTextStream ts ( &f );
ts.setDevice ( &f );
d-> m_sysverstr = ts. readLine ( );
f. close ( );
}
}
m_leds [0] = m_leds [1] = Led_Off;
m_power_timer = 0;
}
void SIMpad::initButtons ( )
{
if ( d-> m_buttons )
return;
if ( isQWS( ) )
QWSServer::setKeyboardFilter ( this );
d-> m_buttons = new QValueList <ODeviceButton>;
for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) {
s_button *sb = simpad_buttons + i;
ODeviceButton b;
if (( sb-> model & d-> m_model ) == d-> m_model ) {
b. setKeycode ( sb-> code );