Skip to content

MiP_Gesture

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

Class MiP_Gesture

Manages MiP's gesture subsystem.

Public Elements

MIP_CMD_GET_GESTURE_RADAR_MODE

Signature: constexpr uint8_t MIP_CMD_GET_GESTURE_RADAR_MODE

Summary: MiP protocol command bytes used by the gesture subsystem.

Details:

These values are placed in the first byte of requests sent to the MiP (and appear in the corresponding responses). See the official MiP BLE Protocol for the complete list.


MIP_CMD_SET_GESTURE_RADAR_MODE

Signature: constexpr uint8_t MIP_CMD_SET_GESTURE_RADAR_MODE


MIP_CMD_GET_GESTURE_RESPONSE

Signature: constexpr uint8_t MIP_CMD_GET_GESTURE_RESPONSE


MiP_Gesture

Signature: MiP_Gesture(MiP &mip)

Summary: Constructs the gesture subsystem manager.

Parameters:

Parameter Description
mip A reference to the main MiP object to access core services.

enable

Signature: void enable()

Summary: Enables gesture detection mode on the MiP.

Details:

Uses verified mode switching (command + read-back confirmation with retry).


disable

Signature: void disable()

Summary: Disables gesture detection mode.

Details:

Uses verified mode switching (command + read-back confirmation with retry).


isEnabled

Signature: bool isEnabled()

Summary: Checks whether gesture detection mode is currently active.

Returns: true if gesture mode is enabled.


availableEvents

Signature: uint8_t availableEvents()

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

Details:

Processes any pending serial data first to update the internal queue.

Returns: Number of available gesture events.


readEvent

Signature: MiPGesture readEvent()

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

Details:

Processes pending serial data first. Returns MIP_GESTURE_INVALID and sets last error to MIP_ERROR_NO_EVENT if the queue is empty.

Returns: The gesture event code.


areGestureAndRadarModesDisabled

Signature: bool areGestureAndRadarModesDisabled()

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

Returns: true if both modes are off (i.e., in MIP_GESTURE_RADAR_DISABLED state).


processEvent

Signature: void processEvent(uint8_t gestureCode)


Clone this wiki locally