From c1054caf4a23ab50e4af1c46b63539e64c90cb1d Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sun, 27 Nov 2022 12:44:45 +0100 Subject: [PATCH] Only set wantResponse for admin packets --- meshtastic/node.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/meshtastic/node.py b/meshtastic/node.py index dfb8da5..c1e4d39 100644 --- a/meshtastic/node.py +++ b/meshtastic/node.py @@ -666,7 +666,7 @@ class Node: # pylint: disable=R1710 - def _sendAdmin(self, p: admin_pb2.AdminMessage, wantResponse=False, + def _sendAdmin(self, p: admin_pb2.AdminMessage, wantResponse=True, onResponse=None, adminIndex=0): """Send an admin message to the specified node (or the local node if destNodeNum is zero)""" @@ -677,14 +677,9 @@ class Node: adminIndex = self.iface.localNode._getAdminChannelIndex() logging.debug(f'adminIndex:{adminIndex}') - # don't ask for an Ack if you are getting a Response - if wantResponse: - wantAck = False - else: - wantAck = True return self.iface.sendData(p, self.nodeNum, portNum=portnums_pb2.PortNum.ADMIN_APP, - wantAck=wantAck, + wantAck=False, wantResponse=wantResponse, onResponse=onResponse, channelIndex=adminIndex)