fix
This commit is contained in:
parent
9e6fb60a71
commit
c3829c180e
@ -18,7 +18,7 @@ void setup() {
|
||||
Serial.println("Scanning...");
|
||||
}
|
||||
|
||||
std::__cxx11::string currentName;
|
||||
char currentName[128];
|
||||
bool gotBasicInfo;
|
||||
bool gotCellInfo;
|
||||
|
||||
@ -97,7 +97,11 @@ void loop() {
|
||||
|
||||
gotBasicInfo=false;
|
||||
gotCellInfo=false;
|
||||
currentName=advertisedDevice.getName();
|
||||
|
||||
std::__cxx11::string deviceName = advertisedDevice.getName();
|
||||
strncpy(currentName, deviceName.c_str(), sizeof(currentName) - 1);
|
||||
currentName[sizeof(currentName) - 1] = '\0'; // Ensure null-termination
|
||||
|
||||
while(gotBasicInfo==false || gotCellInfo==false){
|
||||
// REQUEST BASIC INFO
|
||||
// header status command length data checksum footer
|
||||
|
Loading…
Reference in New Issue
Block a user