summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-09-03 20:36:38 (UTC)
committer mickeyl <mickeyl>2005-09-03 20:36:38 (UTC)
commit62ae8e732a5d4e5b23d060185c0655b1666be59c (patch) (unidiff)
tree71e6d1530036731274f8ea0262423e74e86fe9f7
parentde950b18690b8981a2bddaca68cbd5d48c71f689 (diff)
downloadopie-62ae8e732a5d4e5b23d060185c0655b1666be59c.zip
opie-62ae8e732a5d4e5b23d060185c0655b1666be59c.tar.gz
opie-62ae8e732a5d4e5b23d060185c0655b1666be59c.tar.bz2
switch to 5-point calibration to make it work on some newer Zaurii
this goes hand in hand with the integration of the RMK tslib calibration algorithm into Qt/Embedded 2.3.x. Patch courtesy Richard Purdie.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--core/apps/calibrate/calibrate.cpp6
2 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 38b65c0..1c713ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -65,6 +65,7 @@
65 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) 65 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl)
66 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) 66 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl)
67 * Fix / Optimize number of scanned directories (ljp) 67 * Fix / Optimize number of scanned directories (ljp)
68 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl)
68 69
69 2005-03-25Opie 1.2.0 70 2005-03-25Opie 1.2.0
70 71
diff --git a/core/apps/calibrate/calibrate.cpp b/core/apps/calibrate/calibrate.cpp
index 5f52bdc..53388f1 100644
--- a/core/apps/calibrate/calibrate.cpp
+++ b/core/apps/calibrate/calibrate.cpp
@@ -124,7 +124,7 @@ bool Calibrate::sanityCheck()
124 QPoint br = cd.devPoints[QWSPointerCalibrationData::BottomRight]; 124 QPoint br = cd.devPoints[QWSPointerCalibrationData::BottomRight];
125 125
126 // not needed anywhere .. just calculate it, so it's there 126 // not needed anywhere .. just calculate it, so it's there
127 cd.devPoints[QWSPointerCalibrationData::Center] = QRect( tl, br ).normalize().center(); 127 //cd.devPoints[QWSPointerCalibrationData::Center] = QRect( tl, br ).normalize().center();
128 128
129 int dlx = QABS( bl. x ( ) - tl. x ( )); 129 int dlx = QABS( bl. x ( ) - tl. x ( ));
130 int dly = QABS( bl. y ( ) - tl. y ( )); 130 int dly = QABS( bl. y ( ) - tl. y ( ));
@@ -175,7 +175,7 @@ void Calibrate::moveCrosshair( QPoint pt )
175void Calibrate::paintEvent( QPaintEvent * ) 175void Calibrate::paintEvent( QPaintEvent * )
176{ 176{
177 QPainter p( this ); 177 QPainter p( this );
178 int y = height() / 3; 178 int y = height() / 2;
179 179
180 p.drawText( 0, y + height() / 8, width(), height() - y, AlignHCenter, 180 p.drawText( 0, y + height() / 8, width(), height() - y, AlignHCenter,
181 tr( "Touch the crosshairs firmly and\n" 181 tr( "Touch the crosshairs firmly and\n"
@@ -223,7 +223,7 @@ void Calibrate::mouseReleaseEvent( QMouseEvent * )
223 bool doMove = TRUE; 223 bool doMove = TRUE;
224 224
225 cd.devPoints[ location ] = penPos; 225 cd.devPoints[ location ] = penPos;
226 if ( location < QWSPointerCalibrationData::TopRight ) { 226 if ( location < QWSPointerCalibrationData::Center ) {
227 location = (QWSPointerCalibrationData::Location) ( int( location ) + 1 ); 227 location = (QWSPointerCalibrationData::Location) ( int( location ) + 1 );
228 } 228 }
229 else { 229 else {