Skip to content

Commit 4050d08

Browse files
committed
Add debug print statements for SEND_CLUSTER environment variable
1 parent 39f5e89 commit 4050d08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

not1mm/bandmap.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,9 @@ def receive(self) -> None:
852852
except UnicodeDecodeError:
853853
continue
854854

855+
if os.environ.get("SEND_CLUSTER", False) is not False:
856+
print(f"{data}")
857+
855858
if "login:" in data or "call:" in data or "callsign:" in data:
856859
self.send_command(self.callsignField.text())
857860
return
@@ -920,6 +923,8 @@ def disconnected(self) -> None:
920923
def send_command(self, cmd: str) -> None:
921924
"""Send a command to the cluster."""
922925
cmd += "\r\n"
926+
if os.environ.get("SEND_CLUSTER", False) is not False:
927+
print(f"{cmd}")
923928
tosend = bytes(cmd, encoding="ascii")
924929
logger.debug("Command sent to the cluster")
925930
if self.socket:

0 commit comments

Comments
 (0)