mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2024-11-09 22:24:06 -08:00
add reply debug logging
This commit is contained in:
parent
de1f9079c0
commit
3839b050b9
8
utils.py
8
utils.py
|
@ -16,12 +16,18 @@ def send_message(message, destination, interface):
|
||||||
max_payload_size = 200
|
max_payload_size = 200
|
||||||
for i in range(0, len(message), max_payload_size):
|
for i in range(0, len(message), max_payload_size):
|
||||||
chunk = message[i:i + max_payload_size]
|
chunk = message[i:i + max_payload_size]
|
||||||
interface.sendText(
|
try:
|
||||||
|
d = interface.sendText(
|
||||||
text=chunk,
|
text=chunk,
|
||||||
destinationId=destination,
|
destinationId=destination,
|
||||||
wantAck=False,
|
wantAck=False,
|
||||||
wantResponse=False
|
wantResponse=False
|
||||||
)
|
)
|
||||||
|
logging.info(f"REPLY SEND ID={d.id}")
|
||||||
|
except Exception as e:
|
||||||
|
logging.info(f"REPLY SEND ERROR {e.message}")
|
||||||
|
|
||||||
|
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue