Update to work with NimBLE core changes.

This commit is contained in:
h2zero 2021-09-06 09:15:44 -06:00
parent afb76b8cb6
commit 06e2d188b1
2 changed files with 3 additions and 3 deletions

View file

@ -64,7 +64,7 @@ NimBLEMeshModel* NimBLEMeshElement::createModel(uint16_t type, NimBLEMeshModelCa
case BT_MESH_MODEL_ID_HEALTH_SRV:
m_pHealthModel = new NimBLEHealthSrvModel(pCallbacks);
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;
default:
@ -72,7 +72,7 @@ NimBLEMeshModel* NimBLEMeshElement::createModel(uint16_t type, NimBLEMeshModelCa
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;
}

View file

@ -161,7 +161,7 @@ bool NimBLEMeshNode::start() {
// Config server and primary health models are required in the primary element
// 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++) {
m_configSrvModel->keys[i] = BT_MESH_KEY_UNUSED;
}