@@ -411,6 +411,7 @@ def sendText(
411411 wantResponse : bool = False ,
412412 onResponse : Optional [Callable [[dict ], Any ]] = None ,
413413 channelIndex : int = 0 ,
414+ portNum : portnums_pb2 .PortNum .ValueType = portnums_pb2 .PortNum .TEXT_MESSAGE_APP
414415 ):
415416 """Send a utf8 string to some other node, if the node has a display it
416417 will also be shown on the device.
@@ -421,12 +422,12 @@ def sendText(
421422 Keyword Arguments:
422423 destinationId {nodeId or nodeNum} -- where to send this
423424 message (default: {BROADCAST_ADDR})
424- portNum -- the application portnum (similar to IP port numbers)
425- of the destination, see portnums.proto for a list
426425 wantAck -- True if you want the message sent in a reliable manner
427426 (with retries and ack/nak provided for delivery)
428427 wantResponse -- True if you want the service on the other side to
429428 send an application layer response
429+ portNum -- the application portnum (similar to IP port numbers)
430+ of the destination, see portnums.proto for a list
430431
431432 Returns the sent packet. The id field will be populated in this packet
432433 and can be used to track future message acks/naks.
@@ -435,7 +436,7 @@ def sendText(
435436 return self .sendData (
436437 text .encode ("utf-8" ),
437438 destinationId ,
438- portNum = portnums_pb2 . PortNum . TEXT_MESSAGE_APP ,
439+ portNum = portNum ,
439440 wantAck = wantAck ,
440441 wantResponse = wantResponse ,
441442 onResponse = onResponse ,
0 commit comments