From 1407654c52dcf473b28df513a94afd294e3ca819 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Thu, 21 Sep 2017 19:33:45 +0800 Subject: [PATCH] Must include sdkconfig.h before testing defines --- .../SimpleBLE/examples/SimpleBleDevice/SimpleBleDevice.ino | 3 ++- libraries/SimpleBLE/src/SimpleBLE.cpp | 2 ++ libraries/SimpleBLE/src/SimpleBLE.h | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/SimpleBLE/examples/SimpleBleDevice/SimpleBleDevice.ino b/libraries/SimpleBLE/examples/SimpleBleDevice/SimpleBleDevice.ino index 03097ebc..3a9825a6 100644 --- a/libraries/SimpleBLE/examples/SimpleBleDevice/SimpleBleDevice.ino +++ b/libraries/SimpleBLE/examples/SimpleBleDevice/SimpleBleDevice.ino @@ -16,11 +16,12 @@ // Useful if you want to advertise some sort of message // Button is attached between GPIO 0 and GND, and the device name changes each time the button is pressed +#include "SimpleBLE.h" + #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED) #error Bluetooth is not enabled! Please run `make menuconfig` to and enable it #endif -#include "SimpleBLE.h" SimpleBLE ble; void onButton(){ diff --git a/libraries/SimpleBLE/src/SimpleBLE.cpp b/libraries/SimpleBLE/src/SimpleBLE.cpp index 59ca4327..68064723 100644 --- a/libraries/SimpleBLE/src/SimpleBLE.cpp +++ b/libraries/SimpleBLE/src/SimpleBLE.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "sdkconfig.h" + #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) #include "SimpleBLE.h" diff --git a/libraries/SimpleBLE/src/SimpleBLE.h b/libraries/SimpleBLE/src/SimpleBLE.h index 1da74131..e43d9037 100644 --- a/libraries/SimpleBLE/src/SimpleBLE.h +++ b/libraries/SimpleBLE/src/SimpleBLE.h @@ -15,6 +15,8 @@ #ifndef _SIMPLE_BLE_H_ #define _SIMPLE_BLE_H_ +#include "sdkconfig.h" + #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED) #include