Doly C++ SDK v1.00
Loading...
Searching...
No Matches
TouchControl Namespace Reference

Functions

int8_t init ()
 Initialize the touch controller and start the worker thread.
int8_t dispose ()
 Stop the worker thread and release resources.
bool isActive ()
 Check whether the touch controller is active (initialized and running).
bool isTouched (TouchSide side)
 Check whether the given side is currently touched.
float getVersion ()
 Get current library version.

Function Documentation

◆ dispose()

int8_t TouchControl::dispose ( )

Stop the worker thread and release resources.

Returns
Status code:
  • 0 : success
  • -1 : left sensor GPIO release failed
  • -2 : right sensor GPIO release failed
Examples
TouchControl/main.cpp.

◆ getVersion()

float TouchControl::getVersion ( )

Get current library version.

Original note: format 0.XYZ (3 digits after major).

Returns
Version as float.
Examples
TouchControl/main.cpp.

◆ init()

int8_t TouchControl::init ( )

Initialize the touch controller and start the worker thread.

Returns
Status code:
  • 0 : success
  • 1 : already initialized (no-op)
  • -1 : left sensor GPIO initialization failed
  • -2 : right sensor GPIO initialization failed
Examples
TouchControl/main.cpp.

◆ isActive()

bool TouchControl::isActive ( )

Check whether the touch controller is active (initialized and running).

Returns
true if active; false otherwise.

◆ isTouched()

bool TouchControl::isTouched ( TouchSide side)

Check whether the given side is currently touched.

Parameters
sideSensor side to query.
Returns
true if touched; false otherwise.