A controller for a 5 wire resistive touch screen
Diff: TouchController.cpp
- Revision:
- 5:519187025bb4
- Parent:
- 4:ab2e56595286
--- a/TouchController.cpp Thu Sep 22 22:38:32 2016 +0200 +++ b/TouchController.cpp Thu Sep 22 21:22:31 2016 +0000 @@ -35,7 +35,7 @@ { DigitalIn S(_S, PullUp); ConfigPins(DETECT); - Thread::wait(settle); + Thread::wait(_settle); return (S.read() == 1 ? 0 : 1); } @@ -43,7 +43,7 @@ float TouchController::RawX() { ConfigPins(X); - Thread::wait(settle); + Thread::wait(_settle); return MeasureS(); } @@ -51,18 +51,18 @@ float TouchController::RawY() { ConfigPins(Y); - Thread::wait(settle); + Thread::wait(_settle); return MeasureS(); } float TouchController::GetX() { ConfigPins(X); - Thread::wait(settle); + Thread::wait(_settle); float x_t = MeasureS(); ConfigPins(Y); - Thread::wait(settle); + Thread::wait(_settle); float y_t = MeasureS(); return (A*x_t+B*y_t+C); @@ -71,11 +71,11 @@ float TouchController::GetY() { ConfigPins(X); - Thread::wait(settle); + Thread::wait(_settle); float x_t = MeasureS(); ConfigPins(Y); - Thread::wait(settle); + Thread::wait(_settle); float y_t = MeasureS(); return (D*x_t+E*y_t+F);