From 4fce10b03ed28afe041a6f964c41d8f0aa754934 Mon Sep 17 00:00:00 2001 From: Florian Ludwig Date: Sun, 10 Jun 2018 21:38:01 +0200 Subject: [PATCH] always reset mac counters even if lora package could not been sent fixes #76 --- src/lorawan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lorawan.cpp b/src/lorawan.cpp index a9260bc9..2406049f 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -153,6 +153,7 @@ void do_send(osjob_t *j) { } #endif +end: // clear counter if not in cumulative counter mode if (cfg.countermode != 1) { reset_counters(); // clear macs container and reset all counters @@ -161,7 +162,6 @@ void do_send(osjob_t *j) { } // Schedule next transmission -end: os_setTimedCallback(&sendjob, os_getTime() + sec2osticks(cfg.sendcycle * 2), do_send);