未验证 提交 03e9e07f 编写于 作者: R Rodrigo Garcia 提交者: GitHub

Fixes BLE data printing (#7699)

* Fixes BLE data printing

BLE data has no '\0' terminator, therefore it can't be printed as a regular C string.
This fix just prints the BLE data based on its length.

* Simplify printing to a single call
上级 ff4bbc22
......@@ -29,7 +29,8 @@ static void notifyCallback(
Serial.print(" of data length ");
Serial.println(length);
Serial.print("data: ");
Serial.println((char*)pData);
Serial.write(pData, length);
Serial.println();
}
class MyClientCallback : public BLEClientCallbacks {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册