Browse Source

Bug de lectura de datos cada segundo

dacowars 1 tháng trước cách đây
mục cha
commit
6c01dc047f
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      main/main.ino

+ 3 - 2
main/main.ino

@@ -194,8 +194,9 @@ void task_mediciones(void *pvParameters) {
     unsigned long startMillis = millis();
     // se leen los valores antes de utilizar el semaphore    
     while (gpsSerial.available() > 0) {
-      char c = gpsSerial.read();
-      Serial.print(c);
+      if (gps.encode(gpsSerial.read())) {  
+        break; 
+      }
     }
 
     float new_latitude = gps.location.lat();