always reset mac counters even if lora package could not been sent

fixes #76
This commit is contained in:
Florian Ludwig 2018-06-10 21:38:01 +02:00
parent 28f0396185
commit 4fce10b03e

View File

@ -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);