Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
semuadmin committed Apr 30, 2024
1 parent 15a84ae commit 1d84afe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ src/pygnssutils.egg-*
/tests/__pycache__
*.pyc
/examples/ubxsandpit.py
/examples/temp*.py
/examples/temp*.*
/.pytest_cache/
pylint_report.txt
venv
Expand Down
6 changes: 3 additions & 3 deletions examples/spartn_ntrip_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class from pygnssutils library. Can be used with the
Usage:
python3 spartn_ntrip_client.py user="youruser" password="yourpassword" outfile="spartnntrip.log"
python3 spartn_ntrip_client.py user="youruser" password="yourpassword" mountpoint="EU" outfile="spartnntrip.log"
Run from /examples folder.
Expand All @@ -37,7 +37,6 @@ class from pygnssutils library. Can be used with the
SERVER = "ppntrip.services.u-blox.com"
PORT = 2102
HTTPS = 1
MOUNTPOINT = "EU" # amend to your region


def main(**kwargs):
Expand All @@ -47,6 +46,7 @@ def main(**kwargs):

user = kwargs.get("user", getenv("PYGPSCLIENT_USER", "user"))
password = kwargs.get("password", getenv("PYGPSCLIENT_PASSWORD", "password"))
mountpoint = kwargs.get("mountpoint", "EU")
outfile = kwargs.get("outfile", "spartnntrip.log")

with open(outfile, "wb") as out:
Expand All @@ -59,7 +59,7 @@ def main(**kwargs):
server=SERVER,
port=PORT,
https=HTTPS,
mountpoint=MOUNTPOINT,
mountpoint=mountpoint,
datatype="SPARTN",
ntripuser=user,
ntrippassword=password,
Expand Down
2 changes: 1 addition & 1 deletion src/pygnssutils/gnssmqttclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def _run(
if i > 4:
raise TimeoutError(
f"Unable to connect to {settings['server']}"
+ f":{settings['port']} in {timeout} seconds. "
+ f":{settings['port']} in {timeout} seconds. {err}"
) from err
self._do_log(f"Trying to connect {i} ...", VERBOSITY_MEDIUM)
sleep(timeout / 4)
Expand Down

0 comments on commit 1d84afe

Please sign in to comment.