Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
semuadmin committed May 1, 2024
1 parent ddd678a commit 2e2b26f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions examples/gnssmqttclient_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:license: BSD 3-Clause
"""

from datetime import datetime
from datetime import datetime, timezone
from os import getenv, path
from pathlib import Path
from sys import argv
Expand All @@ -38,8 +38,8 @@ def main(**kwargs):
clientid = kwargs.get("clientid", getenv("MQTTCLIENTID", default="enter-client-id"))
outfile = kwargs.get("outfile", None)
decode = kwargs.get("decode", 0)
decryptkey = kwargs.get("decryptkey", getenv("MQTTKEY", default=None))
decryptbasedate = kwargs.get("decryptbasedate", datetime.now())
key = kwargs.get("key", getenv("MQTTKEY", default=None))
basedate = kwargs.get("basedate", datetime.now(timezone.utc))
stream = None

if outfile is not None:
Expand All @@ -56,9 +56,9 @@ def main(**kwargs):
"topic_ip": 1, # SPARTN correction data (SPARTN OCB, HPAC & GAD messages)
"topic_mga": 0, # Assist Now ephemera data (UBX MGA-EPH-* messages)
"topic_key": 0, # SPARTN decryption keys (UBX RXM_SPARTNKEY messages)
"decode": decode,
"decryptkey": decryptkey,
"decryptbasedate": decryptbasedate,
"spartndecode": decode,
"spartnkey": key,
"spartnbasedate": basedate,
"output": stream,
"errevent": Event(),
}
Expand Down
6 changes: 3 additions & 3 deletions examples/spartn_mqtt_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def main(**kwargs):
tlskey=path.join(Path.home(), f"device-{clientid}-pp-key.pem"),
region=region,
mode=0,
topic_ip=1,
topic_mga=0,
topic_key=0,
topic_ip=1, # SPARTN correction data (SPARTN OCB, HPAC & GAD messages)
topic_mga=0, # Assist Now ephemera data (UBX MGA-EPH-* messages)
topic_key=0, # SPARTN decryption keys (UBX RXM_SPARTNKEY messages)
spartndecode=decode,
spartnkey=key,
spartnbasedate=datetime.now(timezone.utc),
Expand Down

0 comments on commit 2e2b26f

Please sign in to comment.