Skip to content

MiP_Gesture

github-actions[bot] edited this page Aug 10, 2026 · 10 revisions

Class MiP_Gesture

Manages MiP's gesture detection subsystem and event queue.

Table of Contents


Public Functions

enable

Signature: void enable()

Summary: Enables MiP's gesture detection mode.

Details:

Uses verified mode switching (sends mode command + read-back confirmation with automatic retry on failure).


disable

Signature: void disable()

Summary: Disables gesture detection mode.

Details:

Uses verified mode switching (sends disable command + read-back confirmation with automatic retry on failure).


isEnabled

Signature: bool isEnabled()

Summary: Checks whether gesture detection mode is currently active on MiP.

Returns: true if gesture mode is enabled (mode equals MIP_GESTURE), false otherwise.


availableEvents

Signature: uint8_t availableEvents()

Summary: Returns the number of unread gesture events currently in the queue.

Details:

Processes any pending serial data first to ensure the internal queue is up to date.

Returns: uint8_t Number of available gesture events in the queue.


readEvent

Signature: MiPGesture readEvent()

Summary: Reads the next available gesture event from the queue.

Details:

Processes pending serial data first. Pops the oldest gesture event from the queue. Returns MIP_GESTURE_INVALID and sets last error to MIP_ERROR_NO_EVENT if the queue is empty.

Returns: MiPGesture The gesture event direction code, or MIP_GESTURE_INVALID if none available.


areGestureAndRadarModesDisabled

Signature: bool areGestureAndRadarModesDisabled()

Summary: Checks whether both gesture detection and radar tracking modes are disabled.

Returns: true if both modes are off (in MIP_GESTURE_RADAR_DISABLED state), false otherwise.


Public Variables

MIP_CMD_GET_GESTURE_RADAR_MODE

Signature: constexpr uint8_t MIP_CMD_GET_GESTURE_RADAR_MODE

Summary: MiP protocol command byte to query the current gesture/radar operating mode.


MIP_CMD_SET_GESTURE_RADAR_MODE

Signature: constexpr uint8_t MIP_CMD_SET_GESTURE_RADAR_MODE

Summary: MiP protocol command byte to configure the gesture/radar operating mode.


MIP_CMD_GET_GESTURE_RESPONSE

Signature: constexpr uint8_t MIP_CMD_GET_GESTURE_RESPONSE

Summary: MiP protocol notification byte received when a gesture is recognized.


Clone this wiki locally