From 7024c27cea2dc54ecadccd48dd55a6bedab59961 Mon Sep 17 00:00:00 2001 From: Keith Wiley Date: Fri, 9 Apr 2021 00:26:54 -0700 Subject: [PATCH] Made default empty timestamps conform to parsed timestamps to better enable timestamp diff detection. --- micropyGPS.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/micropyGPS.py b/micropyGPS.py index 221829b..f8947f6 100644 --- a/micropyGPS.py +++ b/micropyGPS.py @@ -72,7 +72,7 @@ class MicropyGPS(object): ##################### # Data From Sentences # Time - self.timestamp = [0, 0, 0] + self.timestamp = [0, 0, 0.0] self.date = [0, 0, 0] self.local_offset = local_offset @@ -187,7 +187,7 @@ class MicropyGPS(object): seconds = float(utc_string[4:]) self.timestamp = (hours, minutes, seconds) else: # No Time stamp yet - self.timestamp = (0, 0, 0) + self.timestamp = [0, 0, 0.0] except ValueError: # Bad Timestamp value present return False @@ -285,7 +285,7 @@ class MicropyGPS(object): seconds = float(utc_string[4:]) self.timestamp = (hours, minutes, seconds) else: # No Time stamp yet - self.timestamp = (0, 0, 0) + self.timestamp = [0, 0, 0.0] except ValueError: # Bad Timestamp value present return False