Repository navigation
GUI import fixes from an audit; File > Open in RPM - #10
Merged
Merged
Conversation
add_p25_trunked_system and add_conv_system appended the system before adding its sets, so a set name already taken left the system behind without them; add_rr_conv_channels could leave the analog system when the P25 set failed. They now put the personality back when any part fails. The GUI's import paths (paste and API panel, Import Wizard, P25 System Database, System Wizard) showed the error but kept whatever had gone in, unmarked, for Save to write; they now roll back to the state before the import and say nothing was added.
…untagged TGs - The WAN entry was named after the WACN and held WACN 0, so a second system on the same WACN got no WAN entry at all. Like RPM's files, the entry is now named after the system and holds the WACN (hex, as RadioReference gives it), for the paste and the API tab alike. - A talkgroup-only or frequency-only import named a trunk or talkgroup set it never made, which validation then reported as missing. - The API tab counted talkgroups without a service tag as selected but left them out of the import; they have no box to uncheck and are kept.
Any line whose first column read as a number from 25 to 1300 became a conventional channel, so talkgroups 800 and 801 turned into channels at 800 and 801 MHz (inside the radio's band, so validation said nothing) and the paste panel injected them, ticked, with TX on. Bare frequency lines on a trunked page went in both as trunk frequencies and as channels. A frequency now needs its decimal point, and a pasted page's conventional channels come only from its conventional tables (the "Frequency License Type Tone ..." header).
- A second system on the same band and phase (PSERN, then WSP) failed: the System Wizard and the database dialog always made the standard IDEN set under its default name. They now share a set already in the personality with the template's entries, as RPM's files do, and number the name when a set with other entries has it (iden_set_for_template, also used by the Import Wizard's database tab). - Both wrote home unit ID 0 and all system flags off whatever Settings said; the Import Wizard's database tab wrote unit 0. They now apply the home unit ID and the system flags from Settings. - The System Wizard did not warn before adding a database system whose IDs are unverified, as the other paths do. - Back on the frequency or talkgroup step lost what was typed. - Lines the wizard could not read were dropped without a word: control channel marks (851.0125c, "851.5125,c"), "MHz", tab-separated pairs and tab-separated talkgroups now read, and the review lists the lines left out. It no longer lists empty trunk and talkgroup sets it never makes.
- Templates went in with only names, frequencies and tones: NOAA came
in transmitting and FRS and MURS wide. Every field a template gives is
passed on now.
- A QuickPRS talkgroup CSV's sets were merged into one, with TX off and
scan on for every talkgroup, and trunk and P25 conventional CSVs could
not be imported ("No importable data"). Each set now goes in as it is,
under its own name (a lone set can be renamed); when one cannot, none
do.
- Import on the clipboard tab imported the last preview, not the text in
the box.
- CONV_SET.csv (export-csv, import-csv, the wizard) had no TX, RX, scan
or narrowband column, so a receive-only channel came back transmitting
and a narrowband one wide. The columns (Y/N) now follow the old ones;
files without them import as before, and where a file has no TxFreq or
RxFreq column, TX and RX are still read as the frequencies.
- Hex viewer: a click on the ASCII column picked the byte before (and
the first character did nothing); the last, short line's ASCII column
started one or two characters later than the others; Next highlighted
a length worked out again from the search box ("0x41 0x42" as four
bytes, or whatever had been typed since).
- Repeater calculator: after an invalid entry, Add still added the pair
from before; and it offered to add 1.25 m and 33 cm pairs, which the
XG-100P cannot tune (136-174, 380-520, 762-870 MHz). The form's edited
frequencies are checked too.
QuickPRS cannot write a radio yet; RPM does. Open in RPM hands the personality to Harris RPM, ready to write: it finds RPM through Windows' .PRS association (when that is RPM's) or RPM's install folder, saves changes first (RPM reads the file on disk), asks before handing over a file that fails validation, and starts RPM with the file as Explorer would.
detect_band_limits narrowed any 700/800 MHz system to 767-858 MHz, so a system with channels above 858 MHz (800 MHz downlinks run to 869.9875) got band limits that left them out; its test asserted exactly that. RPM writes 136-870 MHz for nearly every system, 800 MHz ones among them (PSERN, with channels up to 860.7 MHz), and so does QuickPRS now.
The boxes were read as decimal: RadioReference's "Sysid: 3AB" was refused, and an all-digit hex ID such as 892 went in as 892 instead of 0x892, silently. They are hex now (labeled, database systems shown in hex, the review shows hex and decimal), limited to 12 and 20 bits.
RPM's IDEN sets for 700/800 MHz networks hold both bands (the same four slots in both RPM-saved examples); QuickPRS's templates cover the band of a system's first frequency. How the radio uses the slots decides the fix, so it is written down with an RPM check rather than guessed.
The preview said 6.25 kHz for a Phase II system while the IDEN set it writes (like every TDMA entry RPM saves) uses 12.5 kHz carriers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from a bug audit of the GUI parts that hadn't had one: the RadioReference paste and API panel, the Import Wizard, the System Wizard, the P25 System Database dialog, the hex viewer and the calculator. Every finding was reproduced against the code before it was fixed. It also adds File > Open in RPM.
What was wrong
add_p25_trunked_systemandadd_conv_systemappended the system before adding its sets. A set name already taken, for example a WACN-named IDEN set, left the system without its sets. The GUI showed the error but kept the partial system, unmarked, for Save to write.all_or_nothing, also used byadd_rr_conv_channels).app.roll_back()) and says nothing was added.iden_set_for_templateshares a matching IDEN set or numbers the name; the Import Wizard's database tab uses it too.export-csv,import-csv, the wizard): a receive-only channel came back transmitting. It has Y/N columns now, after the old ones. Old files import as before, and in a file without TxFreq/RxFreq columns, "TX" and "RX" are still read as the frequencies.851.0125c,851.5125,c,MHz, tab-separated pairs and talkgroups. They now read, and the review lists any line left out.Added
Tests
tests/test_all_or_nothing.py,tests/test_gui_imports.py,tests/test_csv_conv_flags.py,tests/test_gui_tools.py,tests/test_rpm.py, plus additions totest_gui_smoke.pyandtest_radioreference.py.Open question, written down rather than guessed
RPM's IDEN sets for 700/800 networks hold both bands in four slots: 800 FDMA, 700 FDMA, 800 TDMA, 700 TDMA. QuickPRS's templates cover only the band of the first frequency. The right fix depends on whether the radio uses the programmed slot numbers, so
docs/prs-format.mdnow lists it with a check to do in RPM.