31#include "../SensorBuildOpt.h"
32#if !SENSORLIB_EXCLUDE_TOUCH_COMMON
96 bool addPoint(uint16_t
x, uint16_t
y, uint16_t
pressure = 0, uint8_t
id = 0, uint8_t event = 0);
164 return points + pointCount;
172 return points + pointCount;
Gesture
Gesture types recognized by the touch controller.
@ HOLD
Hold (long press) gesture.
@ SWIPE_DOWN
Swipe downward gesture.
@ SWIPE_LEFT
Swipe leftward gesture.
@ NONE
No gesture detected.
@ SWIPE_UP
Swipe upward gesture.
@ SWIPE_RIGHT
Swipe rightward gesture.
SensorPressure pressure(bhy)
Container for touch point data and optional gesture information.
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.
const TouchPoint & operator[](uint8_t index) const
TouchPoint & operator[](uint8_t index)
static constexpr uint8_t MAX_POINTS
Maximum number of touch points supported.
uint8_t getPointCount() const
Returns the number of stored touch points.
const TouchPoint * end() const
const TouchPoint * begin() const
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.