29#include "../SensorBuildOpt.h"
30#if !SENSORLIB_EXCLUDE_TOUCH_COMMON
48 points[pointCount].
x =
x;
49 points[pointCount].
y =
y;
51 points[pointCount].
id = id;
52 points[pointCount].
event = event;
70 if (index < pointCount)
return points[index];
77 if (index < pointCount)
return points[index];
84 return pointCount > 0;
#define SENSORLIB_LOG_E(...)
Gesture
Gesture types recognized by the touch controller.
@ NONE
No gesture detected.
SensorPressure pressure(bhy)
Gesture getGesture() const
Returns the stored gesture.
bool hasGesture() const
Checks whether a gesture is stored.
bool addPoint(uint16_t x, uint16_t y, uint16_t pressure=0, uint8_t id=0, uint8_t event=0)
Adds a touch point to the container.
static constexpr uint8_t MAX_POINTS
Maximum number of touch points supported.
uint8_t getPointCount() const
Returns the number of stored touch points.
void setGesture(Gesture g)
Sets the gesture for this touch event.
void clear()
Clears all stored touch points and gesture.
TouchPoints()
Constructs an empty TouchPoints object.
TouchPoint & getPoint(uint8_t index)
Gets a reference to a touch point at the specified index.
bool hasPoints() const
Checks whether any touch points are stored.
Represents a single touch point with its properties.
uint16_t pressure
Pressure value (0 if not supported by the chip).
uint8_t event
Event type based on actual hardware feedback, most touch devices do not support.
uint8_t id
Touch point ID for multi‑touch tracking.
uint16_t x
X coordinate of the touch point.
uint16_t y
Y coordinate of the touch point.