From 43c9d96373a293cba8ef9ebf50c73c797bf518e9 Mon Sep 17 00:00:00 2001 From: James Fellows Date: Wed, 3 Feb 2021 20:17:23 -0700 Subject: [PATCH] Update migration guide to include Characteristic constructor now being private --- docs/Migration_guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Migration_guide.md b/docs/Migration_guide.md index 6967182..ca11884 100644 --- a/docs/Migration_guide.md +++ b/docs/Migration_guide.md @@ -69,6 +69,8 @@ For example `BLEServer::createService(SERVICE_UUID)` will work just as it did be ### Characteristics +The constructor for `(Nim)BLECharacteristic` is now private, so if you currently subclass it to add logic you should switch to use `NimBLEService::createCharacteristic` instead. Any custom processing logic previously in a `BLECharacteristic` subclass should be moved to a `NimBLECharacteristicCallbacks` subclass instead, and passed into `NimBLECharacteristic::setCallbacks`. + `BLEService::createCharacteristic` (`NimBLEService::createCharacteristic`) is used the same way as originally except the properties parameter has changed. When creating a characteristic the properties are now set with `NIMBLE_PROPERTY::XXXX` instead of `BLECharacteristic::XXXX`.