mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 12:37:45 +01:00
check gnss len
This commit is contained in:
parent
a159a9f899
commit
a172a9c6c8
@ -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;
|
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");
|
ESP_LOGW(TAG, "No GNSS location available");
|
||||||
return gnss_data; // empty
|
return gnss_data; // empty
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user