Maestro C API  v0.1 Alpha
Vibration control functions

These functions are used to set the vibration effect for an individual finger. More...

Functions

void set_thumb_vibration_effect (intptr_t maestroPtr, uint8_t effect)
 
void set_index_vibration_effect (intptr_t maestroPtr, uint8_t effect)
 
void set_middle_vibration_effect (intptr_t maestroPtr, uint8_t effect)
 
void set_ring_vibration_effect (intptr_t maestroPtr, uint8_t effect)
 
void set_little_vibration_effect (intptr_t maestroPtr, uint8_t effect)
 
uint8_t get_thumb_vibration_effect (intptr_t maestroPtr)
 
uint8_t get_index_vibration_effect (intptr_t maestroPtr)
 
uint8_t get_middle_vibration_effect (intptr_t maestroPtr)
 
uint8_t get_ring_vibration_effect (intptr_t maestroPtr)
 
uint8_t get_little_vibration_effect (intptr_t maestroPtr)
 
const VibrationContext *const get_vibration_context (intptr_t maestroPtr)
 

Detailed Description

These functions are used to set the vibration effect for an individual finger.

#include "maestro.h"

Here's a good article if you're unsure which effect you should use for certain interactions.

Below is a list of available vibration effects (the DRV2605 haptic driver is used):

Function Documentation

◆ get_index_vibration_effect()

uint8_t get_index_vibration_effect ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
Current vibration effect for the index finger.

◆ get_little_vibration_effect()

uint8_t get_little_vibration_effect ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
Current vibration effect for the little (pinky) finger.

◆ get_middle_vibration_effect()

uint8_t get_middle_vibration_effect ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
Current vibration effect for the middle finger.

◆ get_ring_vibration_effect()

uint8_t get_ring_vibration_effect ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
Current vibration effect for the ring finger.

◆ get_thumb_vibration_effect()

uint8_t get_thumb_vibration_effect ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
Current vibration effect for the thumb.

◆ get_vibration_context()

const VibrationContext* const get_vibration_context ( intptr_t  maestroPtr)
Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
Returns
Current vibration effects. This returns a struct containing the same values acquired by get_thumb_vibration_effect(), get_index_vibration_effect(), get_middle_vibration_effect(), get_ring_vibration_effect(), and get_little_vibration_effect()

◆ set_index_vibration_effect()

void set_index_vibration_effect ( intptr_t  maestroPtr,
uint8_t  effect 
)

Sets the vibration effect for the index finger.

Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
effectThe vibration effect to be used, or 0 for no vibration.

◆ set_little_vibration_effect()

void set_little_vibration_effect ( intptr_t  maestroPtr,
uint8_t  effect 
)

Sets the vibration effect for the little (pinky) finger.

Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
effectThe vibration effect to be used, or 0 for no vibration.

◆ set_middle_vibration_effect()

void set_middle_vibration_effect ( intptr_t  maestroPtr,
uint8_t  effect 
)

Sets the vibration effect for the middle finger.

Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
effectThe vibration effect to be used, or 0 for no vibration.

◆ set_ring_vibration_effect()

void set_ring_vibration_effect ( intptr_t  maestroPtr,
uint8_t  effect 
)

Sets the vibration effect for the ring finger.

Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
effectThe vibration effect to be used, or 0 for no vibration.

◆ set_thumb_vibration_effect()

void set_thumb_vibration_effect ( intptr_t  maestroPtr,
uint8_t  effect 
)

Sets the vibration effect for the thumb.

Parameters
maestroPtrThe pointer the Maestro Glove context. Obtained by get_left_glove_pointer() or get_right_glove_pointer().
effectThe vibration effect to be used, or 0 for no vibration.