mirror of
https://codeberg.org/mclemens/ubitxv6.git
synced 2024-11-19 23:46:12 -05:00
Remove redundant check
This commit is contained in:
parent
3438bef4fb
commit
b116be8644
36
touch.cpp
36
touch.cpp
@ -64,25 +64,23 @@ void touch_update(){
|
|||||||
|
|
||||||
//Serial.printf(" %d,%d", x, y);
|
//Serial.printf(" %d,%d", x, y);
|
||||||
//Serial.println();
|
//Serial.println();
|
||||||
if (z >= Z_THRESHOLD) {
|
msraw = now; // good read completed, set wait
|
||||||
msraw = now; // good read completed, set wait
|
switch (rotation) {
|
||||||
switch (rotation) {
|
case 0:
|
||||||
case 0:
|
xraw = 4095 - y;
|
||||||
xraw = 4095 - y;
|
yraw = x;
|
||||||
yraw = x;
|
break;
|
||||||
break;
|
case 1:
|
||||||
case 1:
|
xraw = x;
|
||||||
xraw = x;
|
yraw = y;
|
||||||
yraw = y;
|
break;
|
||||||
break;
|
case 2:
|
||||||
case 2:
|
xraw = y;
|
||||||
xraw = y;
|
yraw = 4095 - x;
|
||||||
yraw = 4095 - x;
|
break;
|
||||||
break;
|
default: // 3
|
||||||
default: // 3
|
xraw = 4095 - x;
|
||||||
xraw = 4095 - x;
|
yraw = 4095 - y;
|
||||||
yraw = 4095 - y;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user