add commandline option for setting radio configs

This commit is contained in:
geeksville
2020-05-03 20:14:11 -07:00
parent 8254a2b481
commit dbbf14c4bf
3 changed files with 36 additions and 9 deletions

View File

@@ -121,6 +121,15 @@ class MeshInterface:
toRadio.packet.CopyFrom(meshPacket)
self._sendToRadio(toRadio)
def writeConfig(self):
"""Write the current (edited) radioConfig to the device"""
if self.radioConfig == None:
raise Exception("No RadioConfig has been read")
t = mesh_pb2.ToRadio()
t.set_radio.CopyFrom(self.radioConfig)
self._sendToRadio(t)
def _disconnected(self):
"""Called by subclasses to tell clients this interface has disconnected"""
self.isConnected = False