PebbleOS v4.47.0-372-gac5760587
Loading...
Searching...
No Matches
Bluetooth settings

Persistent Bluetooth settings of the firmware. More...

Functions

void bt_settings_init (void)
 Initialize the settings, before the Bluetooth stack starts.
 
bool bt_settings_get_airplane_mode (void)
 Get the airplane mode setting.
 
void bt_settings_set_airplane_mode (bool enable)
 Store the airplane mode setting.
 
bool bt_settings_is_unfaithful (void)
 Check whether the watch is unfaithful.
 
void bt_settings_set_unfaithful (bool is_unfaithful)
 Set whether the watch is unfaithful.
 
void bt_settings_get_capabilities (struct pbl_pp_capabilities *capabilities_out)
 Get the cached capabilities of the last system session.
 
void bt_settings_set_capabilities (const struct pbl_pp_capabilities *capabilities)
 Cache the capabilities of the system session.
 

Detailed Description

Persistent Bluetooth settings of the firmware.

Recovery firmware does not persist them: airplane mode is off, the watch is unfaithful and no capabilities are cached.

Function Documentation

◆ bt_settings_get_airplane_mode()

bool bt_settings_get_airplane_mode ( void  )

Get the airplane mode setting.

Returns
True if airplane mode is on; false by default.

◆ bt_settings_get_capabilities()

void bt_settings_get_capabilities ( struct pbl_pp_capabilities *  capabilities_out)

Get the cached capabilities of the last system session.

Prefer pbl_pp_session_get_capabilities() when connected.

Parameters
[out]capabilities_outCapabilities, zero if none cached.

◆ bt_settings_init()

void bt_settings_init ( void  )

Initialize the settings, before the Bluetooth stack starts.

◆ bt_settings_is_unfaithful()

bool bt_settings_is_unfaithful ( void  )

Check whether the watch is unfaithful.

The watch becomes unfaithful when it bonds with a new phone, until the next sync.

Returns
True if unfaithful; true by default.

◆ bt_settings_set_airplane_mode()

void bt_settings_set_airplane_mode ( bool  enable)

Store the airplane mode setting.

Parameters
enableTrue to turn airplane mode on.

◆ bt_settings_set_capabilities()

void bt_settings_set_capabilities ( const struct pbl_pp_capabilities *  capabilities)

Cache the capabilities of the system session.

When they change, they are persisted and a capabilities changed event is emitted.

Parameters
capabilitiesCapabilities, or NULL to clear the cache.

◆ bt_settings_set_unfaithful()

void bt_settings_set_unfaithful ( bool  is_unfaithful)

Set whether the watch is unfaithful.

Parameters
is_unfaithfulNew state.