修复分配的内存不够添加\0的问题
This commit is contained in:
2
main.cc
2
main.cc
@@ -17,7 +17,7 @@ int main(int argc, char** const argv){
|
||||
auto startTime = std::chrono::system_clock::now();
|
||||
// auto res = serial.GetAtUntil("AT+CFUN=1","OK", 200);
|
||||
// std::cout<<res.value_or("ERROR")<<std::endl;
|
||||
auto res = serial.GetAtResponse("AT+ECICCID", 200);
|
||||
auto res = serial.GetAtResponse("AT+CGSN=0", 200);
|
||||
std::cout<<res.value_or("ERROR")<<std::endl;
|
||||
auto endTime = std::chrono::system_clock::now();
|
||||
std::cout<<std::chrono::duration_cast<std::chrono::milliseconds>(endTime-startTime).count();
|
||||
|
||||
Reference in New Issue
Block a user