check gnss len

This commit is contained in:
oarcher 2024-08-28 21:20:36 +02:00
parent a159a9f899
commit a172a9c6c8

View File

@ -66,7 +66,7 @@ std::map<std::string, std::string> get_gnssinfo_tokens(const std::string &gnss_i
std::map<std::string, std::string> gnss_data;
if (gnss_info.find(",,,,,,") != std::string::npos) {
if ((gnss_info.find(",,,,,,") != std::string::npos) || (gnss_info.find("+CGNSSINFO:") == std::string::npos)) {
ESP_LOGW(TAG, "No GNSS location available");
return gnss_data; // empty
}