Feature: add disable_tx setting #1065 (#1066)

* Feature: add disable_tx setting #1065
This commit is contained in:
ernax78
2022-01-06 21:01:45 +03:00
committed by GitHub
parent 9bc9d37596
commit 1c63d2d334
3 changed files with 13 additions and 9 deletions

View File

@@ -93,7 +93,8 @@ bool RadioLibInterface::canSendImmediately()
/// bluetooth comms code. If the txmit queue is empty it might return an error
ErrorCode RadioLibInterface::send(MeshPacket *p)
{
if (disabled) {
if (disabled || radioConfig.preferences.is_lora_tx_disabled) {
DEBUG_MSG("send - lora_tx_disabled\n");
packetPool.release(p);
return ERRNO_DISABLED;
}
@@ -300,7 +301,7 @@ void RadioLibInterface::handleReceiveInterrupt()
void RadioLibInterface::startSend(MeshPacket *txp)
{
printPacket("Starting low level send", txp);
if (disabled) {
if (disabled || radioConfig.preferences.is_lora_tx_disabled) {
DEBUG_MSG("startSend is dropping tx packet because we are disabled\n");
packetPool.release(txp);
} else {