Skip to content

Commit efa841b

Browse files
committed
mesh_interface: sendAlert: add hopLimit
1 parent 6ff13eb commit efa841b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

meshtastic/mesh_interface.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,15 @@ def sendAlert(
458458
destinationId: Union[int, str] = BROADCAST_ADDR,
459459
onResponse: Optional[Callable[[dict], Any]] = None,
460460
channelIndex: int = 0,
461+
hopLimit: Optional[int]=None,
461462
):
462463
"""Send an alert text to some other node. This is similar to a text message,
463464
but carries a higher priority and is capable of generating special notifications
464465
on certain clients.
465466
466467
Arguments:
467468
text {string} -- The text of the alert to send
469+
hopLimit -- hop limit to use
468470
469471
Keyword Arguments:
470472
destinationId {nodeId or nodeNum} -- where to send this
@@ -482,7 +484,8 @@ def sendAlert(
482484
wantResponse=False,
483485
onResponse=onResponse,
484486
channelIndex=channelIndex,
485-
priority=mesh_pb2.MeshPacket.Priority.ALERT
487+
priority=mesh_pb2.MeshPacket.Priority.ALERT,
488+
hopLimit=hopLimit
486489
)
487490

488491
def sendMqttClientProxyMessage(self, topic: str, data: bytes):

0 commit comments

Comments
 (0)