mirror of
https://github.com/meshtastic/python.git
synced 2026-01-01 12:27:59 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83776ceec5 |
@@ -336,14 +336,14 @@ class Node:
|
|||||||
some_bytes = channelSet.SerializeToString()
|
some_bytes = channelSet.SerializeToString()
|
||||||
s = base64.urlsafe_b64encode(some_bytes).decode('ascii')
|
s = base64.urlsafe_b64encode(some_bytes).decode('ascii')
|
||||||
s = s.replace("=", "").replace("+", "-").replace("/", "_")
|
s = s.replace("=", "").replace("+", "-").replace("/", "_")
|
||||||
return f"https://www.meshtastic.org/e/#{s}"
|
return f"https://meshtastic.org/e/#{s}"
|
||||||
|
|
||||||
def setURL(self, url):
|
def setURL(self, url):
|
||||||
"""Set mesh network URL"""
|
"""Set mesh network URL"""
|
||||||
if self.localConfig is None:
|
if self.localConfig is None:
|
||||||
our_exit("Warning: No Config has been read")
|
our_exit("Warning: No Config has been read")
|
||||||
|
|
||||||
# URLs are of the form https://www.meshtastic.org/d/#{base64_channel_set}
|
# URLs are of the form https://meshtastic.org/d/#{base64_channel_set}
|
||||||
# Split on '/#' to find the base64 encoded channel settings
|
# Split on '/#' to find the base64 encoded channel settings
|
||||||
splitURL = url.split("/#")
|
splitURL = url.split("/#")
|
||||||
b64 = splitURL[-1]
|
b64 = splitURL[-1]
|
||||||
|
|||||||
Reference in New Issue
Block a user