From 5b206b97a38c14763920ff1bef5b38fe73732201 Mon Sep 17 00:00:00 2001 From: h2zero Date: Wed, 13 Apr 2022 20:35:56 -0600 Subject: [PATCH] Update include directives. --- src/NimBLEMeshModel.cpp | 6 +++++- src/NimBLEMeshNode.cpp | 15 +++++++++++---- src/NimBLEMeshNode.h | 12 ++++++++---- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/NimBLEMeshModel.cpp b/src/NimBLEMeshModel.cpp index 1e52fe7..e4f57c6 100644 --- a/src/NimBLEMeshModel.cpp +++ b/src/NimBLEMeshModel.cpp @@ -10,7 +10,11 @@ #include "NimBLEUtils.h" #include "NimBLELog.h" -#include "nimble/nimble_port.h" +#if defined(CONFIG_NIMBLE_CPP_IDF) +# include "nimble/nimble_port.h" +#else +# include "nimble/porting/nimble/include/nimble/nimble_port.h" +#endif #include "NimBLEDevice.h" diff --git a/src/NimBLEMeshNode.cpp b/src/NimBLEMeshNode.cpp index fcd3fbc..d72bbaa 100644 --- a/src/NimBLEMeshNode.cpp +++ b/src/NimBLEMeshNode.cpp @@ -1,20 +1,27 @@ /* - * NimBLEMeshNoce.cpp + * NimBLEMeshNode.cpp * * Created: on July 22 2020 * Author H2zero * */ -#include "sdkconfig.h" +#include "nimconfig.h" #if defined(CONFIG_BT_ENABLED) #include "NimBLEMeshNode.h" #include "NimBLELog.h" #include "NimBLEDevice.h" -#include "services/gap/ble_svc_gap.h" -#include "services/gatt/ble_svc_gatt.h" +#if defined(CONFIG_NIMBLE_CPP_IDF) +# include "services/gap/ble_svc_gap.h" +# include "services/gatt/ble_svc_gatt.h" +#else +# include "nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h" +# include "nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h" +#endif + + #define CID_VENDOR 0x05C3 diff --git a/src/NimBLEMeshNode.h b/src/NimBLEMeshNode.h index 23c9934..b6d56c7 100644 --- a/src/NimBLEMeshNode.h +++ b/src/NimBLEMeshNode.h @@ -9,14 +9,18 @@ #ifndef MAIN_NIMBLE_MESH_NODE_H_ #define MAIN_NIMBLE_MESH_NODE_H_ -#include "sdkconfig.h" -#if defined(CONFIG_BT_ENABLED) #include "nimconfig.h" +#if defined(CONFIG_BT_ENABLED) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpointer-arith" -#include "mesh/glue.h" -#include "mesh/mesh.h" +#if defined(CONFIG_NIMBLE_CPP_IDF) +# include "mesh/glue.h" +# include "mesh/mesh.h" +#else +# include "nimble/nimble/host/mesh/include/mesh/glue.h" +# include "nimble/nimble/host/mesh/include/mesh/mesh.h" +#endif #pragma GCC diagnostic pop /**** FIX COMPILATION ****/