From ee79062a62a8c4d81d266c470d3240fc9782d6e5 Mon Sep 17 00:00:00 2001 From: mhjxs4all <42673004+mhjxs4all@users.noreply.github.com> Date: Mon, 27 Aug 2018 21:27:17 +0200 Subject: [PATCH 1/3] Update GPS.ino /********* don't use restricted name like serial****/ /****** prevents compilation problems ********/ --- GPS/GPS.ino | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/GPS/GPS.ino b/GPS/GPS.ino index 32b426f..d7efd5b 100644 --- a/GPS/GPS.ino +++ b/GPS/GPS.ino @@ -4,13 +4,15 @@ #include -TinyGPSPlus gps; -HardwareSerial Serial1(1); +TinyGPSPlus gps; +/********* don't use restricted name like serial****/ +/****** prevents compilation problems ********/ +HardwareSerial GPSSerial1(1); void setup() { Serial.begin(115200); - Serial1.begin(9600, SERIAL_8N1, 12, 15); //17-TX 18-RX + GPSSerial1.begin(9600, SERIAL_8N1, 12, 15); //17-TX 18-RX } void loop() @@ -43,7 +45,7 @@ static void smartDelay(unsigned long ms) unsigned long start = millis(); do { - while (Serial1.available()) + while (GPSSerial1.available()) gps.encode(Serial1.read()); } while (millis() - start < ms); } From a83ca4703258f698a20a6bbe3e15229a6ef1ba7a Mon Sep 17 00:00:00 2001 From: mhjxs4all <42673004+mhjxs4all@users.noreply.github.com> Date: Mon, 24 Sep 2018 23:44:28 +0200 Subject: [PATCH 2/3] Update GPS.ino --- GPS/GPS.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPS/GPS.ino b/GPS/GPS.ino index d7efd5b..e41e46e 100644 --- a/GPS/GPS.ino +++ b/GPS/GPS.ino @@ -46,7 +46,7 @@ static void smartDelay(unsigned long ms) do { while (GPSSerial1.available()) - gps.encode(Serial1.read()); + gps.encode(GPSSerial1.read()); } while (millis() - start < ms); } From 5f598f030c6917b074fd30217c24f8fa21b97c76 Mon Sep 17 00:00:00 2001 From: mhjxs4all <42673004+mhjxs4all@users.noreply.github.com> Date: Fri, 20 Sep 2019 16:36:05 +0200 Subject: [PATCH 3/3] Updates GPS.ino removed additional; tab and spaces --- GPS/GPS.ino | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/GPS/GPS.ino b/GPS/GPS.ino index e41e46e..2a92b71 100644 --- a/GPS/GPS.ino +++ b/GPS/GPS.ino @@ -1,13 +1,12 @@ /***************************************** * ESP32 GPS VKEL 9600 Bds ******************************************/ +#include -#include - -TinyGPSPlus gps; +TinyGPSPlus gps; /********* don't use restricted name like serial****/ /****** prevents compilation problems ********/ -HardwareSerial GPSSerial1(1); +HardwareSerial GPSSerial1(1); void setup() { @@ -34,13 +33,13 @@ void loop() Serial.println(gps.time.second()); Serial.println("**********************"); - smartDelay(1000); + smartDelay(1000); if (millis() > 5000 && gps.charsProcessed() < 10) Serial.println(F("No GPS data received: check wiring")); } -static void smartDelay(unsigned long ms) +static void smartDelay(unsigned long ms) { unsigned long start = millis(); do @@ -49,4 +48,3 @@ static void smartDelay(unsigned long ms) gps.encode(GPSSerial1.read()); } while (millis() - start < ms); } -