Skip to content

Commit

Permalink
[ESP32] Make the 500ms sleep only happen once with NimBLE (#3402)
Browse files Browse the repository at this point in the history
There's a 500ms sleep in DriveBLEState when using NimBLE. Make it only
happen once during initialization.

It still seems wrong, at least it's less wrong and the whole
rendezvous flow is now 3x faster (~15s -> ~5s).

Fixes #3400
  • Loading branch information
mspang authored and pull[bot] committed Jan 8, 2021
1 parent 087bf1f commit 7d128a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/platform/ESP32/nimble/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,11 @@ void BLEManagerImpl::DriveBLEState(void)
{
err = InitESPBleLayer();
SuccessOrExit(err);
}

// Add delay of 500msec while NimBLE host task gets up and running
{
vTaskDelay(500 / portTICK_RATE_MS);
// Add delay of 500msec while NimBLE host task gets up and running
{
vTaskDelay(500 / portTICK_RATE_MS);
}
}

// If the application has enabled CHIPoBLE and BLE advertising...
Expand Down

0 comments on commit 7d128a7

Please sign in to comment.