Skip to main content
justin11
Senior
Mar 2, 2023 4:22 PM UTC
Question

In TouchGFX is there a way to dynamically enable and disable the touch sensor from a hardware button ?

..

This topic has been closed for replies.

4 replies

MM..1
Super User
Mar 2, 2023 5:00 PM UTC

Yes in your target touch code

justin11
justin11Author
Senior
Mar 2, 2023 5:47 PM UTC

would you mind exapnding on this comment ?

MM..1
Super User
Mar 2, 2023 5:52 PM UTC

In target folder STM32TouchController.cpp

justin11
justin11Author
Senior
Mar 2, 2023 6:26 PM UTC

Thanks, i've modified

bool STM32TouchController::sampleTouch ( int32_t& x, int32_t& y )

to return false when i've disabled it.