Skip to content

Commit 04dbe88

Browse files
committed
update config panels
1 parent 9ac80a0 commit 04dbe88

26 files changed

Lines changed: 480 additions & 266 deletions

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"telemetry.feedback.enabled": false,
2222
"python.analysis.addHoverSummaries": false,
2323
"python-envs.defaultEnvManager": "ms-python.python:venv",
24-
"python-envs.pythonProjects": [],
2524
"python.venvPath": "${userHome}/pygpsclient/bin/python3",
2625
"python.systemPath": "/usr/local/bin/python3.14",
2726
"python.defaultInterpreterPath": "${userHome}/pygpsclient/bin/python3",

README.md

Lines changed: 37 additions & 31 deletions
Large diffs are not rendered by default.

RELEASE_NOTES.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# PyGPSClient Release Notes
22

3+
### RELEASE 1.6.5
4+
5+
FIXES:
6+
1. Fix custom map import spurious validation error.
7+
8+
ENHANCEMENTS:
9+
1. Add preset description entry field to Configuration Command Recorder import facility.
10+
1. Make TTY Presets dialog fully resizeable.
11+
1. Update NMEA config panel to allow preset commands to be edited or entered manually before sending.
12+
1. Update NMEA config panel to recognise correct PAIR responses for some Quectel set and poll commands (e.g. a PAIR864 Set baud rate command corresponds to a PAIR865 poll response).
13+
314
### RELEASE 1.6.4
415

516
FIXES:
@@ -8,7 +19,7 @@ FIXES:
819

920
ENHANCEMENTS:
1021
1. Improve Base Station receiver configuration handling in the NTRIP Caster/Socket Server dialog.
11-
1. Add connected device descriptor to status bar (e.g. "u-blox ZED-F9P", "Unicore UM981S", "Septentrio mosaic-X5" or "Quectel LG290AG03"). **FYI** This is based on a series of query messages (*one for each enabled protocol*) sent approximately 3 seconds after the connection is started (*you may see 'unknown protocol' warnings in response to some of these messages; these can be ignored)*. Failing this, a generic descriptor is displayed on receipt of a message protocol unique to a particular manufacturer (*e.g. "u-blox" on receipt of a UBX message, "Unicore" on receipt of a UNI message, etc.*). Note that some (mainly older) devices may not return a meaningful descriptor, in which case "N/A" will be displayed.
22+
1. Add connected device descriptor to status bar (e.g. "u-blox ZED-F9P", "Unicore UM981S", "Septentrio mosaic-X5" or "Quectel LG290AG03"). **FYI** This is based on a poll of hardware information messages (*one for each enabled protocol*) sent approximately 3 seconds after the connection is started (*you may see 'unknown protocol' warnings in response to some of these messages; these can be ignored)*. Failing this, a generic descriptor is displayed on receipt of a message protocol unique to a particular manufacturer (*e.g. "u-blox" on receipt of a UBX message, "Unicore" on receipt of a UNI message, etc.*). Note that some (mainly older) devices may not return a meaningful descriptor, in which case "N/A" will be displayed. Note also that some receivers will not output hardware information or other status messages at low baud rates (< 38,400)
1223
1. Minor updates to serial port configuration panel (additional timeout values).
1324
1. Mininum pynmeagps version updated to v1.1.1.
1425

images/app.png

-763 KB
Loading

images/nmeaconfig_widget.png

72.2 KB
Loading

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies = [
5454
"Pillow>=9.0.0",
5555
"pygnssutils>=1.1.22",
5656
"pyunigps>=0.2.0",
57-
"pynmeagps>=1.1.1",
57+
"pynmeagps>=1.1.2",
5858
]
5959

6060
[project.scripts]

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.4"
11+
__version__ = "1.6.5"

src/pygpsclient/dialog_state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def __init__(self):
9797
DLGTTTY: {
9898
CLASS: TTYPresetDialog,
9999
DLG: None,
100-
RESIZE: False,
100+
RESIZE: True,
101101
},
102102
DLGTRECORD: {
103103
CLASS: RecorderDialog,

src/pygpsclient/dynamic_config_frame.py

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@
9898
)
9999
# alternative POLL dictionary names for where POLL command
100100
# doesn't correspond to SET (fudge for Quectel)
101+
# e.g. a PAIR864 (set baud rate) command corresponds to PAIR865 (poll baud rate)
102+
# (for PAIR commands, the poll is typically one digit higher than the set)
101103
ALT_POLL_NAMES = {
102104
"AIR050": "AIR051",
103105
"AIR058": "AIR059",
@@ -111,8 +113,8 @@
111113
"AIR100": "AIR101",
112114
"AIR104": "AIR105",
113115
"AIR400": "AIR401",
114-
"AIR410": "AIR421",
115-
"AIR420": "AIR411",
116+
"AIR410": "AIR411",
117+
"AIR420": "AIR421",
116118
"AIR432": "AIR433",
117119
"AIR434": "AIR435",
118120
"AIR436": "AIR437",
@@ -225,7 +227,7 @@ def _body(self):
225227
command=self._on_refresh,
226228
font=self.__app.font_md,
227229
)
228-
self._lbl_command = Label(self, text="", width=30, anchor=W)
230+
self._lbl_command = Label(self, text="", anchor=W)
229231
self._frm_container = Frame(self)
230232
self._can_container = Canvas(self._frm_container)
231233
self._frm_attrs = Frame(self._can_container)
@@ -246,31 +248,45 @@ def _do_layout(self):
246248
Layout widgets.
247249
"""
248250

249-
self._lbl_cfg_dyn.grid(column=0, row=0, columnspan=4, padx=3, sticky=EW)
251+
self._lbl_cfg_dyn.grid(column=0, row=0, columnspan=3, padx=3, pady=3, sticky=EW)
250252
self._lbx_cfg_cmd.grid(
251-
column=0, row=1, columnspan=2, rowspan=6, padx=3, pady=3, sticky=EW
253+
column=0, row=1, columnspan=1, rowspan=10, padx=3, pady=3, sticky=EW
254+
)
255+
self._scr_cfg_cmd.grid(column=1, row=1, rowspan=10, sticky=(N, S, W))
256+
self._btn_send_command.grid(
257+
column=2, row=1, ipadx=3, ipady=3, padx=3, pady=3, sticky=W
258+
)
259+
self._lbl_send_command.grid(
260+
column=2, row=2, ipadx=3, ipady=3, padx=3, pady=3, sticky=W
261+
)
262+
self._btn_refresh.grid(
263+
column=2, row=3, ipadx=3, ipady=3, padx=3, pady=3, sticky=W
264+
)
265+
self._lbl_command.grid(
266+
column=0, row=11, columnspan=3, padx=3, pady=3, sticky=EW
252267
)
253-
self._scr_cfg_cmd.grid(column=1, row=1, rowspan=6, sticky=(N, S, E))
254-
self._btn_send_command.grid(column=3, row=1, ipadx=3, ipady=3, sticky=W)
255-
self._lbl_send_command.grid(column=3, row=2, ipadx=3, ipady=3, sticky=W)
256-
self._btn_refresh.grid(column=3, row=3, ipadx=3, ipady=3, sticky=W)
257-
self._lbl_command.grid(column=0, row=7, columnspan=4, padx=3, sticky=EW)
258268
self._frm_container.grid(
259-
column=0, row=8, columnspan=4, rowspan=15, padx=3, sticky=NSEW
269+
column=0,
270+
row=12,
271+
columnspan=3,
272+
rowspan=15,
273+
padx=3,
274+
pady=3,
275+
sticky=NSEW,
260276
)
261277
self._can_container.grid(
262-
column=0, row=0, columnspan=3, rowspan=15, padx=3, sticky=NSEW
278+
column=0,
279+
row=0,
280+
columnspan=3,
281+
rowspan=15,
282+
padx=3,
283+
pady=3,
284+
sticky=NSEW,
263285
)
264-
self._scr_container_ver.grid(column=3, row=0, rowspan=15, sticky=(N, S, E))
286+
self._scr_container_ver.grid(column=3, row=0, rowspan=15, sticky=(N, S, W))
265287
self._scr_container_hor.grid(
266-
column=0, row=15, columnspan=4, rowspan=15, sticky=EW
288+
column=0, row=15, columnspan=3, rowspan=15, sticky=EW
267289
)
268-
269-
cols, rows = self.grid_size()
270-
for i in range(cols):
271-
self.grid_columnconfigure(i, weight=1)
272-
for i in range(rows):
273-
self.grid_rowconfigure(i, weight=1)
274290
self.option_add("*Font", self.__app.font_sm)
275291

276292
def _attach_events(self):
@@ -406,7 +422,7 @@ def _do_poll_cfg(self, *args, **kwargs): # pylint: disable=unused-argument
406422
return
407423

408424
msg = penddlg = pendcfg = None
409-
# use alternate names for some NMEA PAIR/PQTM POLL commands
425+
# use alternate name for some NMEA PAIR/PQTM POLL commands
410426
cfg_id = ALT_POLL_NAMES.get(self._cfg_id, self._cfg_id)
411427
# set any POLL arguments to specified or default values
412428
# e.g. portid = "1", msgname="RMC"
@@ -477,23 +493,26 @@ def _do_poll_args(self, cfg_id: str) -> dict:
477493
pass
478494
return args
479495

480-
def update_status(self, msg: object):
496+
def update_status(self, msg: NMEAMessage | UBXMessage):
481497
"""
482498
UBXHandler or NMEAHandler module has received expected command response
483499
and forwarded it to this module, entry widgets are pre-populated with
484500
current configuration values and confirmation status is updated.
485501
486-
:param object msg: UBXMessage or NMEAMessage response
502+
:param NMEAMessage | UBXMessage msg: UBXMessage or NMEAMessage response
487503
"""
488504

505+
# self.logger.debug(f"{msg.identity=}")
489506
ok = False
490-
# strip off any variant suffix from cfg_id
491-
# e.g. "QTMCFGUART_CURR" -> "PQTMCFGUART"
492-
cfg_id = (
493-
"P" + self._cfg_id.rsplit("_", 1)[0]
494-
if self._protocol == NMEA
495-
else self._cfg_id
496-
)
507+
if self._protocol == NMEA:
508+
# use alternate name for some NMEA PAIR/PQTM POLL commands
509+
# e.g. a PAIR864 (set baud rate) command corresponds to PAIR865 (poll baud rate)
510+
cfg_id = ALT_POLL_NAMES.get(self._cfg_id, self._cfg_id)
511+
# strip off any variant suffix from cfg_id
512+
# e.g. "QTMCFGUART_CURR" -> "PQTMCFGUART"
513+
cfg_id = "P" + cfg_id.rsplit("_", 1)[0]
514+
else:
515+
cfg_id = self._cfg_id
497516

498517
# if this message identity matches an expected response
499518
if msg.identity in (cfg_id, ACK, NAK):
@@ -530,13 +549,13 @@ def _clear_widgets(self):
530549
wdg.destroy()
531550
wdg = None
532551
Label(self._frm_attrs, text="Attribute", width=12, anchor=W).grid(
533-
column=0, row=0, padx=3, sticky=(W)
552+
column=0, row=0, padx=3, sticky=W
534553
)
535554
Label(self._frm_attrs, text="Value", width=20, anchor=W).grid(
536-
column=1, row=0, padx=3, sticky=(W)
555+
column=1, row=0, padx=3, sticky=W
537556
)
538557
Label(self._frm_attrs, text="Type", width=5, anchor=W).grid(
539-
column=2, row=0, padx=3, sticky=(W)
558+
column=2, row=0, padx=3, sticky=W
540559
)
541560

542561
def _add_widgets(self, pdict: dict, row: int, index: int) -> int:

src/pygpsclient/globals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@
271271
VALDMY = 8
272272
VALLEN = 9
273273
VALBOOL = 10
274+
VALREGEX = 11
275+
VALCUSTOM = 12
274276
WAYPOINT = "waypoint"
275277
WIDGETU1 = (200, 200) # small widget size
276278
WIDGETU2 = (300, 200) # medium widget size

0 commit comments

Comments
 (0)