From a909a3619b63323e5f36405bd04575c92aa7efc4 Mon Sep 17 00:00:00 2001 From: Dionysis Grigoropoulos Date: Sat, 28 Oct 2023 23:47:39 +0300 Subject: [PATCH] Fix bug when txp isn't defined --- loramon/loramon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loramon/loramon.py b/loramon/loramon.py index a3cf153..b0ef822 100755 --- a/loramon/loramon.py +++ b/loramon/loramon.py @@ -540,7 +540,7 @@ def main(): print("Bandwidth in Hz:\t", end=' ') rnode.bandwidth = int(input()) - if args.txp >= 0 and args.txp <= 17: + if args.txp and (args.txp >= 0 and args.txp <= 17): rnode.txpower = args.txp else: rnode.txpower = 0