From 757a0b5967b314b4f25de1f173c8ece7a0138dbd Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Fri, 29 May 2020 21:20:27 +0200 Subject: [PATCH] scope reduction --- src/LoRa_APRS_Tracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LoRa_APRS_Tracker.cpp b/src/LoRa_APRS_Tracker.cpp index 81099bd..a164238 100644 --- a/src/LoRa_APRS_Tracker.cpp +++ b/src/LoRa_APRS_Tracker.cpp @@ -47,7 +47,6 @@ void setup() // cppcheck-suppress unusedFunction void loop() { - static int update_min = -1; while (ss.available() > 0) { char c = ss.read(); @@ -57,6 +56,7 @@ void loop() if(gps.time.isUpdated()) { + static int update_min = -1; if(gps.time.isValid() && (gps.time.minute() == update_min || update_min == -1) && gps.location.isValid()