Skip to content

Commit 7737138

Browse files
committed
minor UI tweaks
destroy widget on hide destroy widget on hide clarify waiting for data alerts streamline connection reset add skeleton for unicore support
1 parent cdd320d commit 7737138

48 files changed

Lines changed: 945 additions & 574 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

INSTALLATION.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# PyGPSClient Installation
32

43
[Basics](#basics) |
@@ -92,25 +91,43 @@ brew install python-tk@3.13 libspatialite
9291

9392
Note also that the Homebrew formulae for python-tk>=3.12 include the latest tkinter 9.0 (rather than 8.6). There are known compatibility issues between tkinter 9.0 and other Python packages (*e.g. ImageTk*) on some platform configurations, which may result in PyGPSClient being unable to load. If you encounter these issues, consider using `brew install python-tk@3.11` or an official [Python.org](https://www.python.org/downloads/macos) installation package instead.
9493

94+
Note that on MacOS, serial ports may appear as `/dev/tty*` *or* `/dev/cu*`. To understand the differences between the two, see [here](https://www.codegenes.net/blog/what-s-the-difference-between-dev-tty-and-dev-cu-on-macos/).
95+
9596
### Linux (including Raspberry Pi OS)
9697

97-
Some Linux distributions may not include the necessary pip, tkinter, Pillow or spatialite libraries by default. They may need to be installed separately, e.g.:
98+
Some Linux distributions may not include the necessary pip, venv, tkinter, Pillow or spatialite libraries by default. They may need to be installed separately, e.g. for Debian-based distibutions, a combination of some or all of the following:
99+
100+
```shell
101+
sudo apt install python3-pip python3-tk python3-pil python3-venv python3-pil.imagetk libjpeg-dev zlib1g-dev tk-dev libspatialite
102+
```
103+
104+
For Arch-based distributions:
98105

99106
```shell
100-
sudo apt install python3-pip python3-tk python3-pil python3-pil.imagetk libjpeg-dev zlib1g-dev tk-dev libspatialite
107+
sudo pacman -S tk libspatialite
101108
```
102109

103110
⁴ Support for the sqlite3 `mod_spatialite` extension may require a custom version of Python to be [compiled from source](https://github.com/semuconsulting/PyGPSClient/blob/master/examples/python_compile.sh) if a suitable version is not available from any of the distribution's repos.
104111

105112
## <a name="userpriv">User Privileges</a>
106113

107-
To access the serial port on most Linux platforms, you will need to be a member of the
108-
`tty` and/or `dialout` groups. Other than this, no special privileges are required.
114+
To access the serial port (`/dev/tty*`) on most Linux platforms, you will need to be a member of whichever group or "`Gid`" the `/dev/tty*` device belongs to. Failure to do this will typically result in an error `[Errno 13] could not open port /dev/ttyACM0 [Errno 13] permission denied /dev/ttyACM0`
115+
116+
To check and set the necessary group permissions:
117+
118+
```shell
119+
stat /dev/ttyACM0 | grep Gid
120+
```
121+
`Access: (0660/crw-rw----) Uid: ( 0/ root) Gid: ( 20/ dialout)` <-- group in this case is `dialout`; add user to this group using usermod (*you may have to log out and in again for this to take effect*):
109122

110123
```shell
111-
usermod -a -G tty myuser
124+
sudo usermod -a -G dialout myuser
112125
```
113126

127+
For Debian-based platforms, the group is normally `dialout`; on Arch-based platforms it may be `uucp` or `tty`.
128+
129+
Other than this, no special privileges are required.
130+
114131
## <a name="pip">Install using pip</a>
115132

116133
The recommended way to install the latest version of `PyGPSClient` is with [pip](http://pypi.python.org/pypi/pip/):

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ PyGPSClient is a free, open-source, multi-platform graphical GNSS/GPS testing, d
2323
* Supports NMEA, UBX, SBF, QGC, RTCM3, NTRIP, SPARTN, MQTT and TTY (ASCII) protocols¹.
2424
* Capable of reading from a variety of GNSS data streams: Serial (USB / UART), Socket (TCP / UDP), binary data stream (terminal or file capture) and binary recording (e.g. u-center \*.ubx).
2525
* Provides [NTRIP](#ntripconfig) client facilities.
26-
* Can serve as an [NTRIP base station](#basestation) with an RTK-compatible receiver (e.g. u-blox ZED-F9P/ZED-X20P, Quectel LG290P/LG580P/LC29H and Septentrio Mosaic G5/X5).
27-
* Supports GNSS (*and related*) device configuration via proprietary UBX, NMEA and ASCII TTY protocols, including most u-blox, Quectel, Septentrio and Feyman GNSS devices.
26+
* Can serve as an [NTRIP base station](#basestation) with an RTK-compatible receiver (e.g. u-blox ZED-F9P/ZED-X20P, Quectel LG290P/LG580P/LC29H, Septentrio Mosaic G5/X5 or Unicore UM98n).
27+
* Supports GNSS (*and related*) device configuration via proprietary UBX, NMEA and ASCII TTY protocols, including most u-blox, Quectel, Septentrio, Unicore and Feyman GNSS devices.
2828
* Can be installed using the standard `pip` Python package manager - see [installation instructions](#installation) below.
2929

3030
This is an independent project and we have no affiliation whatsoever with any GNSS manufacturer or distributor.
@@ -104,6 +104,8 @@ For more comprehensive installation instructions, please refer to [INSTALLATION.
104104
1. By default, the Settings panel is displayed to the right of the main application window. It can be hidden or shown via Menu..View..Hide/Show Settings. The panel can also be 'undocked' from the main application window via Menu..View..Undock Settings and - if [non-transient](#transient) (`transient_dialog_b: 0`) - minimized independently of the main window. Exiting the undocked dialog, or selecting Menu..View..Dock Settings, will 'dock' the panel.
105105
1. To connect to a GNSS receiver via USB or UART port, select the device from the listbox, set the appropriate serial connection parameters and click
106106
![connect icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/usbport-1-24.png?raw=true). The application will endeavour to pre-select a recognised GNSS/GPS device but this is platform and device dependent. Press the ![refresh](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/iconmonstr-refresh-6-16.png?raw=true) button to refresh the list of connected devices at any point. `Rate bps` (baud rate) is typically the only setting that might need adjusting, but tweaking the `timeout` setting may improve performance on certain platforms. The `Msg Mode` parameter defaults to `GET` i.e., periodic or poll response messages *from* a receiver. If you wish to parse streams of command or poll messages being sent *to* a receiver, set the `Msg Mode` to `SET` or `POLL`. An optional serial or socket stream inactivity timeout can also be set (in seconds; 0 = no timeout).
107+
108+
If you get a permissions error on attempting to connect to a serial port e.g. `[Errno 13] permission denied /dev/ttyACM0`, refer to the [Installation Guidelines - User Privileges](https://github.com/semuconsulting/PyGPSClient/blob/master/INSTALLATION.md#user-privileges).
107109
1. A custom user-defined serial port can also be passed via the json configuration file setting `"userport_s":`, via environment variable `PYGPSCLIENT_USERPORT` or as a command line argument `--userport`. A special userport value of "ubxsimulator" invokes the experimental [`pyubxutils.UBXSimulator`](https://github.com/semuconsulting/pyubxutils/blob/main/src/pyubxutils/ubxsimulator.py) utility to emulate a GNSS NMEA/UBX serial stream.
108110
1. To connect to a TCP or UDP socket, enter the server URL and port, select the protocol (defaults to TCP) and click
109111
![connect socket icon](https://github.com/semuconsulting/PyGPSClient/blob/master/src/pygpsclient/resources/ethernet-1-24.png?raw=true). For encrypted TLS connections, tick the 'TLS' checkbox. Tick the 'Self Sign' checkbox to accommodate self-signed TLS certification (*typically for test or demonstration services*).
@@ -353,7 +355,7 @@ By default, the server/caster binds to the host address '0.0.0.0' (IPv4) or '::'
353355
1. Select NTRIP CASTER mode and (if necessary) enter the host IP address and port.
354356
1. Select 'TLS' to enable an encrypted TLS (HTTPS) connection.
355357
1. An additional expandable panel is made available to allow the user to configure a connected RTK-compatible receiver to operate in either `FIXED` or `SURVEY-IN` Base Station mode (*NB: parameters can only be amended while the caster is stopped*).
356-
1. Select the receiver type (currently u-blox ZED-F9*, u-blox ZED-X20*, Quectel LG290P, Quectel LC29HBA and Septentrio Mosaic X5 receivers are supported) and click the Send button to send the appropriate configuration commands to the receiver.
358+
1. Select the receiver type and click the Send button to send the appropriate configuration commands to the receiver.
357359
1. **NB** Septentrio Mosaic X5: These receivers are configured via ASCII TTY commands - to monitor the command responses, set the console protocol to "TTY" (*remember to set it back to RTCM when monitoring the RTCM3 output*). Note also that the input (ASCII command) UART port may be different to the output (RTCM3) UART port - make sure to select the appropriate port(s) when configuring the device and monitoring the RTCM3 output.
358360
1. NMEA messages can be suppressed by checking 'Disable NMEA'.
359361
1. NTRIP client login credentials are set via the user and password fields.

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# PyGPSClient Release Notes
22

3+
### RELEASE 1.6.2
4+
5+
1. Add support for Unicore Secondary Antenna and Attitude (IMU) NMEA sentences e.g. UM98n "GGAH", "HPD" (requires pynmeagps>=1.1.0).
6+
1. Minor cosmetic UI enhancements to improve rendering on some Linux window managers (e.g. xfce).
7+
1. `Waiting for XXX data` alerts added to user-selectable widgets to clarify which type of GNSS data each widget is waiting for. Widgets are not 'initialised' (underlying grids & labels drawn) until this data arrives. As in previous versions, widgets which depend on protocol-specific data (e.g. UBX) will display a `Receiver does not appear to support XXX data` alert if requisite data isn't received after 10 navigation solutions.
8+
39
### RELEASE 1.6.1
410

511
1. Updates to main application window geometry (size and position) handling. Current window geometry is now saved to json configuration file as `screengeom_s` (e.g. `"1373x798+71+44"`), and will be restored on restart. Default startup geometry is centered at 75% of screen resolution.

docs/pygpsclient.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,14 @@ pygpsclient.ubx\_solrate\_frame module
532532
:undoc-members:
533533
:show-inheritance:
534534

535+
pygpsclient.uni\_handler module
536+
-------------------------------
537+
538+
.. automodule:: pygpsclient.uni_handler
539+
:members:
540+
:undoc-members:
541+
:show-inheritance:
542+
535543
pygpsclient.widget\_state module
536544
--------------------------------
537545

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ disable = """
134134

135135
[tool.pytest.ini_options]
136136
minversion = "7.0"
137-
addopts = "--cov --cov-report html --cov-fail-under 16"
137+
addopts = "--cov --cov-report html --cov-fail-under 17"
138138
pythonpath = ["src"]
139139
testpaths = ["tests"]
140140

@@ -145,7 +145,7 @@ source = ["src"]
145145
source = ["src"]
146146

147147
[tool.coverage.report]
148-
fail_under = 16
148+
fail_under = 17
149149

150150
[tool.coverage.html]
151151
directory = "htmlcov"

src/pygpsclient/__main__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
:license: BSD 3-Clause
99
"""
1010

11-
import sys
1211
from argparse import SUPPRESS, ArgumentDefaultsHelpFormatter, ArgumentParser
1312
from logging import getLogger
1413
from tkinter import Tk
@@ -151,7 +150,6 @@ def main():
151150
root = Tk()
152151
App(root, **kwargs)
153152
root.mainloop()
154-
sys.exit()
155153

156154

157155
if __name__ == "__main__":

src/pygpsclient/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
:license: BSD 3-Clause
99
"""
1010

11-
__version__ = "1.6.1"
11+
__version__ = "1.6.2"

src/pygpsclient/about_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _body(self):
111111
self._btn_checkupdate = Button(
112112
self._frm_body,
113113
text="",
114-
width=14,
114+
width=16,
115115
cursor="hand2",
116116
)
117117
self._chk_checkupdate = Checkbutton(

0 commit comments

Comments
 (0)