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

Public API for Doly touch sensor control. More...

#include <stdint.h>
#include "TouchEvent.h"

Go to the source code of this file.

Namespaces

namespace  TouchControl

Functions

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

Detailed Description

Public API for Doly touch sensor control.

This API provides a touch controller that samples touch sensors and reports events asynchronously via TouchEvent callbacks.

Overview:

  • Single global touch controller (no instances).
  • Must call init() before use; call dispose() to stop the controller.
  • Events are delivered via TouchEvent and TouchEventListener.
  • Typical sampling frequency is ~20 Hz (implemented by the internal worker thread).

Threading notes:

  • Events are reported asynchronously from an internal worker thread.