fix channel writing from python

This commit is contained in:
Kevin Hester
2021-03-04 20:41:57 +08:00
parent 171c79b414
commit a8c2e9f2dd
3 changed files with 54 additions and 42 deletions

View File

@@ -294,6 +294,17 @@ class MeshInterface:
wantAck=True)
logging.debug("Wrote config")
def writeChannel(self, channelIndex):
"""Write the current (edited) channel to the device"""
p = admin_pb2.AdminMessage()
p.set_channel.CopyFrom(self.channels[channelIndex])
self.sendData(p, self.myInfo.my_node_num,
portNum=portnums_pb2.PortNum.ADMIN_APP,
wantAck=True)
logging.debug("Wrote channel {channelIndex}")
def getMyNodeInfo(self):
if self.myInfo is None:
return None