From 6e1ad0fb5776e5023e1dae904d80ea60d943f872 Mon Sep 17 00:00:00 2001 From: h2zero Date: Mon, 17 Jun 2024 18:15:04 -0600 Subject: [PATCH] Release 1.4.2 --- CHANGELOG.md | 3 ++- docs/Doxyfile | 2 +- docs/Usage_tips.md | 27 +++++++++++++++++++++++++++ docs/index.md | 2 +- library.properties | 2 +- 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83632750..9713c921 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog All notable changes to this project will be documented in this file. -## [unreleased] + +## [1.4.2] 2024-06-17 ### Fixed - `CONFIG_BT_NIMBLE_NVS_PERSIST` value not being used to enable/disable persistance. diff --git a/docs/Doxyfile b/docs/Doxyfile index 4b14524f..bfe5c138 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = NimBLE-Arduino # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.4.1 +PROJECT_NUMBER = 1.4.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/docs/Usage_tips.md b/docs/Usage_tips.md index 8a60ef24..846c182f 100644 --- a/docs/Usage_tips.md +++ b/docs/Usage_tips.md @@ -5,6 +5,33 @@ When commands are sent to the stack from a different core they can experience delays in execution. This library detects this and invokes the esp32 IPC to reroute these commands through the correct core but this also increases overhead. Therefore it is highly recommended to create tasks for BLE to run on the same core, the macro `CONFIG_BT_NIMBLE_PINNED_TO_CORE` can be used to set the core. + +Here is an example of how to do this: +``` +void BLETask(void* param) { + for(;;) { + ..BLE STUFF GOES HERE.. + delay(1); // always delay in the loop to allow other tasks to run + } + vTaskDelete(NULL); // should never get here +} + +void setup() { + ...YOUR INIT CODE... + xTaskCreatePinnedToCore( + BLETask, /* Function to implement the task */ + "BLETask", /* Name of the task */ + 4096, /* Stack size in bytes */ + NULL, /* Task input parameter */ + 2, /* Priority of the task (set higher than loop) */ + nullptr, /* Task handle. */ + CONFIG_BT_NIMBLE_PINNED_TO_CORE); /* Core where main nimble task runs */ +} + +void loop() { + delay(1); +} +```
## Do not delete client instances unless necessary or unused diff --git a/docs/index.md b/docs/index.md index 2f1af75a..1de9563b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ Call `NimBLEDevice::init` in `setup`. * Open platformio.ini, a project configuration file located in the root of PlatformIO project. * Add the following line to the lib_deps option of [env:] section: ``` -h2zero/NimBLE-Arduino@^1.4.0 +h2zero/NimBLE-Arduino@^1.4.2 ``` * Build a project, PlatformIO will automatically install dependencies.
diff --git a/library.properties b/library.properties index d1b32b9c..bcaf3e14 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=NimBLE-Arduino -version=1.4.1 +version=1.4.2 author=h2zero maintainer=h2zero sentence=Bluetooth low energy (BLE) library for arduino-esp32 based on NimBLE.