mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
mesh: add mesh_configuration_server_feature_changed
This commit is contained in:
parent
84d5ed818f
commit
f18cf9fece
@ -1744,6 +1744,15 @@ static void config_heartbeat_publication_emit(mesh_heartbeat_publication_t * mes
|
||||
mesh_heartbeat_publication->count--;
|
||||
}
|
||||
}
|
||||
void mesh_configuration_server_feature_changed(void){
|
||||
mesh_model_t * mesh_model = mesh_model_get_configuration_server();
|
||||
mesh_heartbeat_publication_t * mesh_heartbeat_publication = &((mesh_configuration_server_model_context_t*) mesh_model->model_data)->heartbeat_publication;
|
||||
|
||||
// active features
|
||||
uint16_t active_features = mesh_foundation_get_features();
|
||||
if (mesh_heartbeat_publication->active_features == active_features) return;
|
||||
config_heartbeat_publication_emit(mesh_heartbeat_publication);
|
||||
}
|
||||
|
||||
static void config_heartbeat_publication_timeout_handler(btstack_timer_source_t * ts){
|
||||
|
||||
|
@ -74,13 +74,15 @@ typedef struct {
|
||||
typedef struct {
|
||||
mesh_heartbeat_publication_t heartbeat_publication;
|
||||
mesh_heartbeat_subscription_t heartbeat_subscription;
|
||||
|
||||
|
||||
} mesh_configuration_server_model_context_t;
|
||||
|
||||
// API
|
||||
|
||||
const mesh_operation_t * mesh_configuration_server_get_operations(void);
|
||||
|
||||
void mesh_configuration_server_feature_changed(void);
|
||||
|
||||
void mesh_load_virtual_addresses(void);
|
||||
|
||||
void mesh_delete_virtual_addresses(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user