From 39223c0f486022766247ade47d68313fb72832e1 Mon Sep 17 00:00:00 2001 From: sessionm21 Date: Fri, 15 May 2020 13:55:33 +0100 Subject: [PATCH] move is_sending --- collar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collar.cpp b/collar.cpp index 25634ef..f4ee3ab 100644 --- a/collar.cpp +++ b/collar.cpp @@ -174,7 +174,6 @@ uint8_t buffer[] = { void do_send(osjob_t* j){ // Check if there is not a current TX/RX job running - is_sending = 1; if (LMIC.opmode & OP_TXRXPEND) { Serial.println(F("OP_TXRXPEND, not sending")); } else { @@ -199,6 +198,7 @@ void do_gps(osjob_t* j){ gps.encode(softserial_read()); } if(!is_sending && gps.location.isValid()) { + is_sending = 1; do_send(&sendjob); } os_setTimedCallback(&gpsjob, os_getTime()+sec2osticks(GPS_INTERVAL), do_gps);