diff --git a/esphome/components/lora/lora.cpp b/esphome/components/lora/lora.cpp index 90aa934dfd..f1721423a0 100644 --- a/esphome/components/lora/lora.cpp +++ b/esphome/components/lora/lora.cpp @@ -150,23 +150,11 @@ void Lora::loop() { buffer += (char) c; } } + ESP_LOGD(TAG, "Got %s", buffer); // set the rssi rssi_ = atoi(buffer.substr(buffer.length() - 1, 1).c_str()); // set the raw message raw_message_ = buffer.substr(0, buffer.length() - 1); - /* - * Starting to process the raw message - */ - // found gps data in the raw message, lets parse it - if (raw_message_.find("gps:") != std::string::npos) { - int start = raw_message_.find(','); - // minus gps - latitude_ = atof(raw_message_.substr(4, start).c_str()); - latitude_ = atof(raw_message_.substr(start + 1, raw_message_.length()).c_str()); - ESP_LOGD(TAG, "Location:"); - ESP_LOGD(TAG, "Lat: %f", this->latitude_); - ESP_LOGD(TAG, "Lon: %f", this->longitude_); - } } } // namespace lora