mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 11:22:24 +01:00
[gps] Fix slow parsing (#9953)
This commit is contained in:
@@ -52,7 +52,7 @@ void GPS::update() {
|
|||||||
void GPS::loop() {
|
void GPS::loop() {
|
||||||
while (this->available() > 0 && !this->has_time_) {
|
while (this->available() > 0 && !this->has_time_) {
|
||||||
if (!this->tiny_gps_.encode(this->read())) {
|
if (!this->tiny_gps_.encode(this->read())) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
if (this->tiny_gps_.location.isUpdated()) {
|
if (this->tiny_gps_.location.isUpdated()) {
|
||||||
this->latitude_ = this->tiny_gps_.location.lat();
|
this->latitude_ = this->tiny_gps_.location.lat();
|
||||||
|
Reference in New Issue
Block a user