fixed touchpad orientation
parent
217f15b4d3
commit
bee96e39ad
|
@ -158,8 +158,7 @@ uint16_t tpReadX(void) {
|
||||||
x = cal.xm * _tpReadRealX() + cal.xn;
|
x = cal.xm * _tpReadRealX() + cal.xn;
|
||||||
y = cal.ym * _tpReadRealY() + cal.yn;
|
y = cal.ym * _tpReadRealY() + cal.yn;
|
||||||
|
|
||||||
/*
|
switch(gdispGetOrientation()) {
|
||||||
switch(gdispGetOrientation()) { // implement gdispGetOrientation()
|
|
||||||
case portrait:
|
case portrait:
|
||||||
return x;
|
return x;
|
||||||
case landscape:
|
case landscape:
|
||||||
|
@ -169,9 +168,6 @@ uint16_t tpReadX(void) {
|
||||||
case landscapeInv:
|
case landscapeInv:
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
return x;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -187,8 +183,7 @@ uint16_t tpReadY(void) {
|
||||||
x = cal.xm * _tpReadRealX() + cal.xn;
|
x = cal.xm * _tpReadRealX() + cal.xn;
|
||||||
y = cal.ym * _tpReadRealY() + cal.yn;
|
y = cal.ym * _tpReadRealY() + cal.yn;
|
||||||
|
|
||||||
/*
|
switch(gdispGetOrientation()) {
|
||||||
switch(gdispGetOrientation()) { // implement gdispGetOrientation()
|
|
||||||
case portrait:
|
case portrait:
|
||||||
return y;
|
return y;
|
||||||
case landscape:
|
case landscape:
|
||||||
|
@ -198,9 +193,6 @@ uint16_t tpReadY(void) {
|
||||||
case landscapeInv:
|
case landscapeInv:
|
||||||
return SCREEN_WIDTH - x;
|
return SCREEN_WIDTH - x;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
return y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tpCalibrate(void) {
|
void tpCalibrate(void) {
|
||||||
|
|
Loading…
Reference in New Issue