mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-23 13:40:55 +01:00
Update to work with NimBLE core changes.
This commit is contained in:
parent
afb76b8cb6
commit
06e2d188b1
2 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ NimBLEMeshModel* NimBLEMeshElement::createModel(uint16_t type, NimBLEMeshModelCa
|
||||||
case BT_MESH_MODEL_ID_HEALTH_SRV:
|
case BT_MESH_MODEL_ID_HEALTH_SRV:
|
||||||
m_pHealthModel = new NimBLEHealthSrvModel(pCallbacks);
|
m_pHealthModel = new NimBLEHealthSrvModel(pCallbacks);
|
||||||
pModel = m_pHealthModel;
|
pModel = m_pHealthModel;
|
||||||
m_modelsVec.push_back(bt_mesh_model{{type},0,0,0,&pModel->m_opPub,{0},{0},bt_mesh_health_srv_op,&m_pHealthModel->m_healthSrv});
|
m_modelsVec.push_back(bt_mesh_model{{type},0,0,0,&pModel->m_opPub,{0},{0},bt_mesh_health_srv_op,&bt_mesh_health_cli_cb,&m_pHealthModel->m_healthSrv});
|
||||||
return pModel;
|
return pModel;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -72,7 +72,7 @@ NimBLEMeshModel* NimBLEMeshElement::createModel(uint16_t type, NimBLEMeshModelCa
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_modelsVec.push_back(bt_mesh_model{{type},0,0,0, &pModel->m_opPub,{0},{0},pModel->m_opList, pModel});
|
m_modelsVec.push_back(bt_mesh_model{{type},0,0,0, &pModel->m_opPub,{0},{0},pModel->m_opList,nullptr,pModel});
|
||||||
return pModel;
|
return pModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ bool NimBLEMeshNode::start() {
|
||||||
|
|
||||||
// Config server and primary health models are required in the primary element
|
// Config server and primary health models are required in the primary element
|
||||||
// create them here and add them as the first models.
|
// create them here and add them as the first models.
|
||||||
m_configSrvModel = new bt_mesh_model{{BT_MESH_MODEL_ID_CFG_SRV},0,0,0,nullptr,{0},{0},bt_mesh_cfg_srv_op,&m_serverConfig};
|
m_configSrvModel = new bt_mesh_model{{BT_MESH_MODEL_ID_CFG_SRV},0,0,0,nullptr,{0},{0},bt_mesh_cfg_srv_op,&bt_mesh_cfg_srv_cb,&m_serverConfig};
|
||||||
for(int i = 0; i < CONFIG_BT_MESH_MODEL_KEY_COUNT; i++) {
|
for(int i = 0; i < CONFIG_BT_MESH_MODEL_KEY_COUNT; i++) {
|
||||||
m_configSrvModel->keys[i] = BT_MESH_KEY_UNUSED;
|
m_configSrvModel->keys[i] = BT_MESH_KEY_UNUSED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue