Asia region FT-25R / FT-65R radios treat repeater offsets differently
than their US siblings. This patch adds capabilities to detect such
radios and to correct the offset accordingly.
Fixes#9713Fixes#10286
Some drivers have been incorrectly including the special channels
in the memory_bounds feature attribute. This causes the UI to fetch
them as regulars in addition. This adds a test to make sure the entire
regular memory range between memory_bounds has no extd_number (which
would indicate that it's a special).
This adds some unit tests for the Baofeng FM Radio frequency encoding.
Right now it only tests the BF-T1, but has provisions for the UV-5R
as well. This uncovered a bug in the driver, so once that is fixed,
we can extend and enable that one as well.
The UV-5G (aka UV-5X) GMRS radios are preset from the factory (and
after a RESET) with 30 GMRS channels and 11 NOAA WX radio channels.
The programmed channels are not firmware locked from being changed
or erased, TX is not firmware blocked for unsanctioned frequencies.
In respect to channel programming, they are essentially the same as
any common UV-5R (136-174 MHz & 400-520 MHz and TX/RX on all 128
channels).
This patch gives CHIRP the ability to match the radio's factory
provided programming capability.
It has become apparent that some radios are making changes to the
Memory during set_memory(). That is not technically harmful, but
may indicate an attempt to change something of what the user provided,
or to reflect changes back to the user which will never be seen.
For now, define a FrozenMemory object that just logs this problem and
use that when setting memories from the UI. In the future, this should
turn into an error.
This makes required_step() consider the supported steps when deciding
what to return as required. If not provided, the original set of steps
is used. It also makes validate_memory() provide the radio's supported
list and better reproduces the underlying check's error message.
This allows us to handle radios that don't support 5.0kHz
steps, which is generally assumed to be a safe default. It also allows
calculation of required steps below 2.5 for some that were in use in
the tree already.
Related to #10439
This just makes sure we can get prompts from radios that support them
and that they're strings.
This can be extended to make sure that all drivers expose prompts
that are marked for translation.
Review of a driver recently shows that this test is too simplistic to
catch some issues. This also fixes a bug in the ftlx011 driver, where
deleted memories are never resurrect-able, as poked by this test.
This basically reverts the ts480 part of ba88b54f to restore its
ability to select the finer tuning_step values for modes like sideband.
It adds validate_memory() to reject the memories with invalid mode
and step combinations. This also changes get_mem() in the test base
class to march through the steps as it walks up the bands and memory
channels.
This makes our required_step() function find 10kHz as a suitable
tuning step before 5kHz because of one radio (ft90) that has a bug
related to 5kHz and thus does not support it.
This also makes us set the tuning_step of our test memory to the first
supported one, which may not be the default of 5kHz. The TS480 driver
does some monkeywork with the tuning_step that changes per mode, which
isn't really compatible with the tests or the UI, so this also
makes a change there to just keep things working. But, more attention
is needed there.
This is not actually confirmed working yet, because the upload process
seems to depend on the previous patch for opening the port early.
However, the upload isn't raising python3 errors and the download
works, so I'm calling this reported working for python3 issues
until advised otherwise.
Fixes#10386
This makes us walk all the valid_bands looking for a frequency within
to test with. This will allow drivers to expose multiple bands for
RX-only and TRX capabilities, even if they are adjacent.
Further, if a memory validates with only warnings, set and get the
memory on the radio to resolve any corrections it may need to enforce,
such as mandatory TX frequency corrections, TX inhibit, or anything
else.
We were failing to delete mem.extra for radios that return memories
without an extra field even set, which caused us to not use the
first memory as a candidate. Also, don't refuse one of the virgin
memories if only warnings are raised from validate, and only use the
non-virgin one if it has immutable fields.