PebbleOS
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
Vibe intensity

Default strength of all vibrations. More...

Macros

#define DEFAULT_VIBE_INTENSITY   VibeIntensityHigh
 Intensity used when the user has not chosen one.
 

Enumerations

enum  VibeIntensity { VibeIntensityLow , VibeIntensityMedium , VibeIntensityHigh , VibeIntensityNum }
 Vibration intensity. More...
 

Functions

void vibe_intensity_init (void)
 Apply the intensity stored in the alert preferences.
 
uint8_t get_strength_for_intensity (VibeIntensity intensity)
 Get the strength of an intensity.
 
void vibe_intensity_set (VibeIntensity intensity)
 Set the default strength of all vibrations (not just notifications).
 
VibeIntensity vibe_intensity_get (void)
 Get the intensity stored in the alert preferences.
 
const char * vibe_intensity_get_string_for_intensity (VibeIntensity intensity)
 Get the display name of an intensity.
 
VibeIntensity vibe_intensity_cycle_next (VibeIntensity intensity)
 Get the next intensity in the cycle, wrapping around.
 

Detailed Description

Default strength of all vibrations.

Macro Definition Documentation

◆ DEFAULT_VIBE_INTENSITY

#define DEFAULT_VIBE_INTENSITY   VibeIntensityHigh

Intensity used when the user has not chosen one.

Enumeration Type Documentation

◆ VibeIntensity

Vibration intensity.

Enumerator
VibeIntensityLow 

Low, 40 % strength.

VibeIntensityMedium 

Medium, 60 % strength.

VibeIntensityHigh 

High, full strength.

VibeIntensityNum 

Number of intensities.

Function Documentation

◆ get_strength_for_intensity()

uint8_t get_strength_for_intensity ( VibeIntensity  intensity)

Get the strength of an intensity.

Parameters
intensityIntensity.
Returns
Percentage of the maximum strength, 0-100. Unknown intensities map to 100.

◆ vibe_intensity_cycle_next()

VibeIntensity vibe_intensity_cycle_next ( VibeIntensity  intensity)

Get the next intensity in the cycle, wrapping around.

Parameters
intensityCurrent intensity.
Returns
Next intensity.

◆ vibe_intensity_get()

VibeIntensity vibe_intensity_get ( void  )

Get the intensity stored in the alert preferences.

Returns
Current intensity.

◆ vibe_intensity_get_string_for_intensity()

const char * vibe_intensity_get_string_for_intensity ( VibeIntensity  intensity)

Get the display name of an intensity.

Parameters
intensityIntensity.
Returns
Untranslated name, to be passed through i18n, or NULL if intensity is invalid.

◆ vibe_intensity_init()

void vibe_intensity_init ( void  )

Apply the intensity stored in the alert preferences.

◆ vibe_intensity_set()

void vibe_intensity_set ( VibeIntensity  intensity)

Set the default strength of all vibrations (not just notifications).

Does not persist the intensity.

Parameters
intensityIntensity to apply.