@@ -411,6 +411,7 @@ def sendText(
411
411
wantResponse : bool = False ,
412
412
onResponse : Optional [Callable [[dict ], Any ]] = None ,
413
413
channelIndex : int = 0 ,
414
+ portNum : portnums_pb2 .PortNum .ValueType = portnums_pb2 .PortNum .TEXT_MESSAGE_APP
414
415
):
415
416
"""Send a utf8 string to some other node, if the node has a display it
416
417
will also be shown on the device.
@@ -421,12 +422,12 @@ def sendText(
421
422
Keyword Arguments:
422
423
destinationId {nodeId or nodeNum} -- where to send this
423
424
message (default: {BROADCAST_ADDR})
424
- portNum -- the application portnum (similar to IP port numbers)
425
- of the destination, see portnums.proto for a list
426
425
wantAck -- True if you want the message sent in a reliable manner
427
426
(with retries and ack/nak provided for delivery)
428
427
wantResponse -- True if you want the service on the other side to
429
428
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
430
431
431
432
Returns the sent packet. The id field will be populated in this packet
432
433
and can be used to track future message acks/naks.
@@ -435,7 +436,7 @@ def sendText(
435
436
return self .sendData (
436
437
text .encode ("utf-8" ),
437
438
destinationId ,
438
- portNum = portnums_pb2 . PortNum . TEXT_MESSAGE_APP ,
439
+ portNum = portNum ,
439
440
wantAck = wantAck ,
440
441
wantResponse = wantResponse ,
441
442
onResponse = onResponse ,
0 commit comments