mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 11:56:25 +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;
|
||||
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user