From e5a99a88cc72b864c5565d93335583a8c789b5b8 Mon Sep 17 00:00:00 2001 From: Peter Buchegger Date: Sun, 4 Jun 2023 17:17:50 +0200 Subject: [PATCH] fix TX issue --- src/TaskRadiolib.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TaskRadiolib.cpp b/src/TaskRadiolib.cpp index a887ece..cc28f56 100644 --- a/src/TaskRadiolib.cpp +++ b/src/TaskRadiolib.cpp @@ -164,6 +164,9 @@ bool RadiolibTask::loop(System &system) { } else { if (!txEnable) { // system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, getName(), "[%s] TX is not enabled", timeString().c_str()); + if (!_toModem.empty()) { + _toModem.getElement(); // empty list, otherwise memory will get full. + } } else { if (transmitFlag) { // system.getLogger().log(logging::LoggerLevel::LOGGER_LEVEL_DEBUG, getName(), "[%s] TX signal detected. Waiting TX", timeString().c_str()); @@ -182,8 +185,6 @@ bool RadiolibTask::loop(System &system) { return true; } } - } else { - _toModem.getElement(); // empty list, otherwise memory will get full. } } }