diff options
author | dakkar <dakkar@thenautilus.net> | 2018-08-03 12:25:37 +0100 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2018-08-03 12:25:37 +0100 |
commit | 9ad65d69c1af586b2d07573aba4bb644f6cb1221 (patch) | |
tree | 190e38113a0c7cff8ff5f96fcfc9a8fa6ad897e9 /sensor/patchedBLE/src/BLEDevice.cpp | |
parent | note the source of patchedBLE (diff) | |
download | thermostat-9ad65d69c1af586b2d07573aba4bb644f6cb1221.tar.gz thermostat-9ad65d69c1af586b2d07573aba4bb644f6cb1221.tar.bz2 thermostat-9ad65d69c1af586b2d07573aba4bb644f6cb1221.zip |
uni-init BLE before sleeping
Diffstat (limited to 'sensor/patchedBLE/src/BLEDevice.cpp')
-rw-r--r-- | sensor/patchedBLE/src/BLEDevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sensor/patchedBLE/src/BLEDevice.cpp b/sensor/patchedBLE/src/BLEDevice.cpp index a7db454..3f31ace 100644 --- a/sensor/patchedBLE/src/BLEDevice.cpp +++ b/sensor/patchedBLE/src/BLEDevice.cpp @@ -426,6 +426,14 @@ uint16_t BLEDevice::m_localMTU = 23; vTaskDelay(200/portTICK_PERIOD_MS); // Delay for 200 msecs as a workaround to an apparent Arduino environment issue. } // init +void BLEDevice::uninit() { + if (initialized) { + initialized = false; + esp_bluedroid_disable(); + esp_bt_controller_disable(); + esp_bt_controller_deinit(); + } +} /** * @brief Set the transmission power. |