mirror of
https://github.com/meshtastic/python.git
synced 2026-09-15 23:13:06 -04:00
allow devices to veto this app if we are too old
This commit is contained in:
1 parent
31b52d26c3
commit
830338b20b
1 file changed
+6
@@ -69,6 +69,9 @@ BROADCAST_NUM = 255
|
||||
|
||||
MY_CONFIG_ID = 42
|
||||
|
||||
"""The numeric buildnumber (shared with android apps) specifying the level of device code we are guaranteed to understand"""
|
||||
OUR_APP_VERSION = 167
|
||||
|
||||
|
||||
class MeshInterface:
|
||||
"""Interface class for meshtastic devices
|
||||
@@ -171,6 +174,9 @@ class MeshInterface:
|
||||
logging.debug(f"Received: {asDict}")
|
||||
if fromRadio.HasField("my_info"):
|
||||
self.myInfo = fromRadio.my_info
|
||||
if self.myInfo.min_app_version > OUR_APP_VERSION:
|
||||
raise Exception(
|
||||
"This device needs a newer python client, please \"pip install --upgrade meshtastic\"")
|
||||
elif fromRadio.HasField("radio"):
|
||||
self.radioConfig = fromRadio.radio
|
||||
elif fromRadio.HasField("node_info"):
|
||||
|
||||
Reference in new issue
Block a user