This commit is contained in:
James 2024-04-26 11:59:18 +01:00
parent ad93fb5bdb
commit 62e1d1c632

View File

@ -88,7 +88,7 @@ void loop() {
} }
// Register callback for remote characteristic (receive channel) // Register callback for remote characteristic (receive channel)
Serial.println("Get BMS receive characteristic..."); Serial.println("Register callback for remote characteristic...");
if (pRemoteCharacteristic_rx->canNotify()){ if (pRemoteCharacteristic_rx->canNotify()){
pRemoteCharacteristic_rx->registerForNotify(MyNotifyCallback); pRemoteCharacteristic_rx->registerForNotify(MyNotifyCallback);
}else{ }else{
@ -152,6 +152,7 @@ void loop() {
} }
} }
Serial.println("Disconnect"); Serial.println("Disconnect");
pRemoteCharacteristic_rx->unregisterForNotify();
pClient->disconnect(); pClient->disconnect();
} }
} }