mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
mesh: add mesh_node_set_element_location
This commit is contained in:
parent
454184387b
commit
6f175e0393
@ -78,8 +78,13 @@ mesh_element_t * mesh_node_get_primary_element(void){
|
||||
return &primary_element;
|
||||
}
|
||||
|
||||
|
||||
void mesh_node_set_element_location(mesh_element_t * element, uint16_t location){
|
||||
element->loc = location;
|
||||
}
|
||||
|
||||
void mesh_node_set_primary_element_location(uint16_t location){
|
||||
primary_element.loc = location;
|
||||
mesh_node_set_element_location(&primary_element, location);
|
||||
}
|
||||
|
||||
mesh_element_t * mesh_node_element_for_index(uint16_t element_index){
|
||||
|
@ -82,6 +82,13 @@ void mesh_node_primary_element_address_set(uint16_t unicast_address);
|
||||
*/
|
||||
void mesh_node_set_primary_element_location(uint16_t location);
|
||||
|
||||
/**
|
||||
* @brief Set location of element
|
||||
* @param element
|
||||
* @param location
|
||||
*/
|
||||
void mesh_node_set_element_location(mesh_element_t * element, uint16_t location);
|
||||
|
||||
/**
|
||||
* @brief Get unicast address of primary element
|
||||
*/
|
||||
|
@ -675,7 +675,7 @@ int btstack_main(void)
|
||||
mesh_node_init();
|
||||
|
||||
// Loc - bottom - https://www.bluetooth.com/specifications/assigned-numbers/gatt-namespace-descriptors
|
||||
mesh_node_set_primary_element_location(0x103);
|
||||
mesh_node_set_element_location(mesh_node_get_primary_element(), 0x103);
|
||||
|
||||
// Setup models
|
||||
mesh_configuration_server_model.model_identifier = mesh_model_get_model_identifier_bluetooth_sig(MESH_SIG_MODEL_ID_CONFIGURATION_SERVER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user