Skip to content

Conversation

@h2zero
Copy link
Owner

@h2zero h2zero commented Nov 12, 2024

  • Add functions NimBLEUtils::taskWait and NimBLEUtils::taskRelease to simplify task blocking/messaging.
  • NimBLEUtils::buildHexData replaced with NimBLEUtils::dataToHexString
  • Add missing GAP event strings.
  • Add missing return code strings.
  • NimBLEUtils::dumpGapEvent function removed.
  • Event/error code strings optimized.

* Add functions `NimBLEUtils::taskWait` and `NimBLEUtils::taskRelease` to simplify task blocking/messaging.
* `NimBLEUtils::buildHexData` replaced with `NimBLEUtils::dataToHexString`
* Add missing GAP event strings.
* Add missing return code strings.
* `NimBLEUtils::dumpGapEvent` function removed.
* Event/error code strings optimized.
@h2zero h2zero merged commit beac19c into master Nov 12, 2024
94 checks passed
@h2zero h2zero deleted the refactor-utils branch November 12, 2024 23:57
// Clear the task notification value to ensure we block
ulTaskNotifyValueClear(cur_task, ULONG_MAX);
# endif
ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had issues with tasks getting stuck in spots like this*, seemingly due to some race condition. I've been modifying this locally to use a more realistic value of like 20-30s, and that would clear up the problems for me.
Could this be made into a compile-time configurable value?

*ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
Which I assume is equivalent to
NimBLEUtils::taskWait(*m_pTaskData, BLE_NPL_TIME_FOREVER);

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should be something of a config value.

Please open an issue for discussion to address this so we can get more user feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants