Developer World
Spresense SDK Library v3.2.0-ebc0364
Gesture API

Files

file  arm_gesture_command.h
 

Classes

class  GestureClass
 
struct  GestureTypes
 the structure of gesture type. More...
 
struct  GestureDebugDumpInfo
 
struct  SensorInitGesture
 the structure of gesture type for initilaize. More...
 
struct  GestureSetRotation
 Rotation matrix. Assume x_adjusted, y_adjusted, z_adjusted as adjusted x, y, z acceleration value accordingly. As well, x_sensor, y_sensor, z_sensor are defined as original x, y, z value from sensor accordingly. x_adjusted, y_adjusted and z_adjusted are calculated as follows: x_adjusted = x_sensor * xx + y_sensor * xy + z_sensor * xz; y_adjusted = x_sensor * yx + y_sensor * yy + z_sensor * yz; z_adjusted = x_sensor * zx + y_sensor * zy + z_sensor * zz;. More...
 
struct  SensorExecGesture
 the struct of gesture for the execute command. More...
 
struct  SensorFlushGesture
 the command of gesture terminate. More...
 
struct  SensorResultArmGesture
 the structure of sensor result on arm gesture commands. More...
 
struct  SensorCmdArmGesture
 the structure of arm gesture commands. More...
 

Macros

#define GESTURE_ARM_UP   0x00000001
 ID for ARM_UP event, also used for setting arm state.
 
#define GESTURE_ARM_DOWN   0x00000002
 ID for ARM_DOWN event, also used for setting arm state.
 
#define GESTURE_TWIST   0x00000004
 ID for TWIST event.
 
#define GESTURE_SHAKE   0x00000010
 ID for SHAKE event.
 

Enumerations

enum  GestureArmPosition { GESTURE_POS_UP = 0 , GESTURE_POS_DOWN }
 Arm positions. More...
 
enum  GestureCmdType { GESTURE_CMD_SET_TYPE = 0 , GESTURE_CMD_GET_TYPE , GESTURE_CMD_SET_ARM_POSITION , GESTURE_CMD_ROTATION }
 Publishers. More...
 

Functions

FAR GestureClassGestureCreate (MemMgrLite::PoolId cmd_pool_id)
 Create GestureClass instance. More...
 
int GestureOpen (FAR GestureClass *ins)
 Load Gesture library and boot up as worker task. After booted up, send initialize and wait complete. More...
 
int GestureClose (FAR GestureClass *ins)
 Destory Gesture worker task. More...
 
int GestureWrite (FAR GestureClass *ins, FAR sensor_command_data_mh_t *command)
 Send data to Gesture worker task. More...
 
int GestureSetCoordinate (FAR GestureClass *ins, FAR GestureSetRotation *rotation)
 Set Gesture coordinate. More...
 

Detailed Description

Enumeration Type Documentation

◆ GestureArmPosition

Arm positions.

Enumerator
GESTURE_POS_UP 

Arm position is up.

GESTURE_POS_DOWN 

Arm position is down.

◆ GestureCmdType

Publishers.

Enumerator
GESTURE_CMD_SET_TYPE 

Reconfiguration after initialization.

GESTURE_CMD_GET_TYPE 

Get gesture type.

GESTURE_CMD_SET_ARM_POSITION 

Set arm position. Unusable in SDK 2.0.

GESTURE_CMD_ROTATION 

Rotation. Unusable in SDK 2.0.

Function Documentation

◆ GestureCreate()

FAR GestureClass * GestureCreate ( MemMgrLite::PoolId  cmd_pool_id)

Create GestureClass instance.

Parameters
[in]cmd_pool_id: Pool id for DSP communication data
Returns
Address for instance of GestureClass

◆ GestureOpen()

int GestureOpen ( FAR GestureClass ins)

Load Gesture library and boot up as worker task. After booted up, send initialize and wait complete.

Parameters
[in]ins: instance address of GestureClass
Returns
result of process.

◆ GestureClose()

int GestureClose ( FAR GestureClass ins)

Destory Gesture worker task.

Parameters
[in]ins: instance address of GestureClass
Returns
result of process.

◆ GestureWrite()

int GestureWrite ( FAR GestureClass ins,
FAR sensor_command_data_mh_t command 
)

Send data to Gesture worker task.

Parameters
[in]ins: instance address of GestureClass
[in]command: command including data to send
Returns
result of process

◆ GestureSetCoordinate()

int GestureSetCoordinate ( FAR GestureClass ins,
FAR GestureSetRotation rotation 
)

Set Gesture coordinate.

Parameters
[in]ins: instance address of GestureClass
[in]rotation: coordinate transformation matrix
Returns
result of process