Commit Graph

223 Commits

Author SHA1 Message Date
Dan Clemmensen
dbdf673dcb [ft4] add driver for Yeasu FT-4 and eventually FT-65 #4787
ft4.py passes unit tests on main tip and on py3 branch
2019-02-18 12:53:27 -08:00
Dan Smith
135ac167b8 Fix unittest adapter class
The adapter was ignoring tests that collect and return multiple failures at once,
so any CopyAll failures were ignored. This makes the adapter just pick off the first
one and raise it.

Found while reviewing the driver for #4787
2019-02-16 12:19:21 -08:00
Dan Smith
a7ce0ca2ea Fix Edges::do_oddsteps() test
This test was completely wrong, and not really running for any driver. Realized it was
doing something stupid while trying to run it against the CSV driver (which supports
DC->daylight).

Some radios were claiming to support steps they don't support because they were taking
the full list in chirp_common as a default, which is clearly wrong. This patch changes
the default to a very conservative set, which may cause some drivers to no longer accept
some frequencies that may be valid because they were not declaring their real supported
list.

This also uncovered at least one buggy driver that can't support anything other than
5kHz step frequencies (ic2730).

Found in the pursuit of #495
2019-02-15 10:31:10 -08:00
Dan Smith
7fc39a1478 Add a test for deleting memories and a radio feature flag for radios that can't
Shockingly we were missing an automated test for memory delete. Adding that
uncovered several issues in various drivers. Some drivers explicitly do not
do delete operations, so mark those in radiofeatures so we can skip the test
for them.

Related to #6455 #6453 #6451 #6449
2019-02-14 16:51:57 -08:00
Zhaofeng Li
71d183d2a9 New Model #6421 TYT TH-350 2019-01-31 15:48:53 -08:00
Bruno Maire
161fbbf3b8 New Model #6259 Yaesu FT-7100 2018-12-14 17:47:10 +01:00
Dan Smith
af8dd92c88 Add KG-UV9Dplus image for #3509 2018-12-13 19:44:14 -08:00
Vincent Stipo
7e9eae46c6 [FT818] New Model Support Yaesu FT-818 #5607 2018-12-03 08:31:11 -08:00
Dan Smith
776d7e9b61 Fix detection tests for images with metadata
The test needs to be tolerant of the dyanamic class being
a subclass of the real radio class. Since we didn't have any
metadata-laden images in the tree, this went unnoticed initially.

Related to #6063
2018-09-05 15:03:04 -07:00
Dan Smith
98359ffc97 Add test image for Boblov X3Plus
Related to #6073
2018-09-05 13:57:24 -07:00
Dan Smith
4de8259320 Stash chirp version in image metadata
This makes us save the current CHIRP_VERSION into the image metadata
when we write it out. This is helpful so we can determine if the image
was generated from a newer version, especially if we fail to load it.
This makes mainapp not put up a detection dialog if the image has
metadata (since we would know exactly which driver to use if we could),
and specifically mentions that the image was from a newer version if we
detect that case.

This also stashes the loaded metadata on the radio in case it's useful
later, but does not yet let the driver modify it (at least, modified
metadata will not be saved).

Related to #5995
2018-08-14 06:28:24 -07:00
Dan Smith
106982526d Add metadata blob trailer transparently to image files
This makes FileBackedRadio transparently save image files with an extra
blob of metadata tacked onto the end of the file. The metadata region
begins with a magic string followed by a base64-encoded json blob. I
figure we can call all images created up until now "version zero" format,
since they really aren't formatted at all. Any major format changes after
this can increment the counter in the magic (although it's unlikely we
would need to).

The metadata currently saved includes the radio model details and the class
used at the time the file was created. All existing images will still load,
but when they are saved, will be augmented with metadata. Note that this will
mean images saved from newer versions of chirp will not be readable by older
versions which will be confused by the metadata.

One major feature this brings is the ability to make radio aliases (and other
weak subclasses) be "sticky" across save/load cycles. Right now if you download
with an alias (such as the Arcshell AR-6 alias of the BF-888), the file will
be detected and reported as a BF-888 from that point forward. With metadata in
the image, we can properly select the alias on load to provide better UX.

This includes some low-effort tweaking of the directory and clone code to
select the right radio class based on metadata if present, and to properly
return a radio class for the alias, if one matches. We might want to re-structure
the alias class arrangement after this to make them properly-registered and
fully-functional subclasses so that the hacky DynamicRadioAlias subclassing
done here isn't necessary.

Also note that the generic saving code will not append metadata for filenames
not ending in .img, to preserve behavor for .vx5 files, etc. If a filename forces
a non-standard file extension, the metadata will not be added and the result
will be effectively the same as the older format (which then may not be loaded
properly if it is mis-detected as a different model).

Closes #5995
2018-08-07 12:25:49 -07:00
Rick DeWitt
181f3104bf [ft450d] Add new driver for Yaesu FT-450D. Fixes issue #0951 2018-06-13 06:14:11 -07:00
nicolas jon pike
74f8c2b4bf New Model #5329
FT70 Driver I now have enough of the driver working to be useful.
Read / write memories, a number of the settings, and import from RepeaterBook work.
Saving modes dn,vw and AMS in memory channels, do not currently work.
Banks have not been tested - may now work, VFO settings not implemented (etc)

I have also raised a request for C4FM to be added to CHIRP Modes.
2018-03-08 20:23:39 +00:00
Dan Smith
fa0ccfa301 Fix MURS1 radio to use validate_memory() and make edges test case tolerant
This fixes one test case that should ignore memories that don't validate
from the radio, and makes the MURS1 radio support said validation.

This is related to #5255
2018-02-09 16:10:18 -08:00
Jim Unroe
da1658c217 [MURS-V1] Add Support for BTech MURS-V1
This patch adds support for the BTech MURS-V1 handheld radio.

#5255
2018-02-08 21:17:37 -05:00
Dan Smith
13f23f0ec4 [ic2730] Add test image for Icom 2730A from Rhett
Related to #2745
2018-01-14 16:11:48 -08:00
Pavel Milanes (CO7WT)
fa6441b58f [New Model] Add support for the Baofeng BF-T1, fixes #4933
Add support for the Baofeng BF-T1, also known as BF MINI
or BF-9100.

Complete support for:
 - Channels
 - Special Channels
 - Settings

73 Pavel CO7WT.
2017-12-21 17:29:14 -05:00
Jim Unroe
82db88694e [RT26] Retevis RT-26 UHF Radio
This patch adds memory and settings support for the Retevis  RT-26.

#5413
2017-12-03 13:53:30 -05:00
Dan Smith
903ab34d76 Test image for KG-UV8D_Plus for #5123 2017-11-25 08:54:52 -08:00
Dan Smith
5cca12ee7e Make tests module generate a unittest-compatible interface
This lets us use the integrated unittest runner, which does things
like report failures at the end, stdio buffering, etc. You can still
use the old tests/run_tests if desired (for now), but this makes it
much nicer for the build system.

Loosely related to #5237
2017-10-12 11:35:47 -07:00
Dan Smith
01126ccd11 Make run_tests a proper python module
Also provide a run_tests shell wrapper for compatibility.

Related to #5237
2017-10-12 11:27:16 -07:00
Dan Smith
e740fb387f Remove leftover debug from #5237 2017-10-12 07:20:04 -07:00
Dan Smith
be6ed4f6c6 Fix long-standing test runner output bug
The unified logging code arrests stdout for the purposes of non-interactive
console logging to a file. This has been preventing proper console output
when running in the build system, making it harder to debug failures. This
adds a CHIRP_TESTENV override environment variable, and always sets it from
the test runner since we should always have interactive output from it.

Related to #5237
2017-10-11 21:12:42 -07:00
Dan Smith
af7816ae63 Some fixes to run_tests
First, in r2787 we made the BruteForce test do RadioFeatures validation on
a memory, avoiding a failure if the memory did not validate. For some reason
we still required that radio.validate_memory() pass for any of those tests,
which doesn't allow for the radio to ban quirks in the tests. This makes us
not fail if the radio rightly fails to validate.

Second, we were modifying the memory in do_mode() so that once we passed FM
in the mode sequence we were always trying freq+100Mhz. Depending on how we
ran the tests (i.e. which order we hit the modes) this would sometimes fail.
This makes us copy the original memory so we're stable throughout the modes.

Related to #5237
2017-10-11 20:25:18 -07:00
Dan Smith
f76617beb8 Images for BTECH color display mobile radios
#4825
2017-07-10 07:00:23 -07:00
Jim Unroe
c08122be68 [New Model] Add Radtel Model T18
This patch adds support for programming the channels and global settings
of the Radtel model T18 hand held radio.

#4969
2017-07-05 21:28:42 -04:00
Declan Rieb
4f3c0173c7 [ft2d] Add support for Yaesu FT2DR. #3257 #3325 #3887 2017-07-02 19:00:57 -06:00
Windsor Schmidt
c58f0a4513 [New Model] Add Support for Icom IC-2300H Radio
Patch for review; based on existing code for the IC-2200H.

#959
2017-06-25 15:50:15 -07:00
Jim Unroe
1d8f37d06b [New Model] Add Support for Retevis RT23 Radio
This patch adds basic support for the Retevis RT23 radio.

Note: This patch removes the "sleep" delays that were in the previously
submitted patch.

#4619
2017-06-15 19:56:04 -04:00
Keith Williamson
1e704528ef [vx8] Fix issue with VX-8R download from radio. Fixes #4883
This patch ensures that the functions from the correct radio class are called
when downloading from the radio. This is achieved by defining distinct MODELs
for the VX-8R, VX-8DR, and VX-8GE and deleting their VARIANTs. This patch is
also accompanied (out-of-band) with test image files for each of the radios.
2017-06-05 16:45:08 -07:00
Wade Simmons
79bd0a42da [FTM-3200D] Add support for Yaesu FTM-3200D
This patch adds basic CHIRP support for programming the FTM-3200D. This radio
shares most of its memory layout with the FT1D, so it has been created as a
subclass of that radio.

#4279
2017-05-24 11:15:55 -04:00
Dan Smith
694948d94a Revert accidental commit
#0

Backed out changeset f9a81de5297b
2017-04-30 17:44:49 -07:00
Dan Smith
7366fe5232 Add Rugged RH5R G2
#0
2017-04-28 13:21:20 -07:00
Tom Hayward
66cb3dea5b For radios without tuning steps, test 10 KHz down from the edge. #4689
This should be compatible with virtually any radio.
2017-03-30 12:14:02 -07:00
SASANO Takayoshi
b2aa11d674 Add IC-P7 support. This is Japanese model of IC-P7A, ticket New Model #1947.
I hope IC-P7A/IC-E7 will work.

Supported features
* Regular Memory (CH 0 to 999) editing
  - Bank settings (Bank, Bank Index, Bank Name)
  - DTCS settings (DTCS code, DTCS polarity)
  - Frequency (0.495000-999.990000MHz), Mode, Offset, Tuning step settings
  - Memory Name setting
  - CTCSS tone setting (Tone, TSQL)

Not supported features:
* Train SQL setting in memory
* Common radio settings (Beep, Display, Bank Link, RF power, etc...)
* Scan Edge CH, Auto Write CH, TV CH, CALL CH editing
2017-03-30 22:51:59 +09:00
Tom Hayward
e1ec81809e Fix edge test so high bound is within valid_bands. #4689 2017-03-29 09:38:58 -07:00
Dan Smith
fcff845d7b Add test image for #4585 2017-03-10 09:09:25 -08:00
Dan Smith
fc53457017 Images for #2107 2017-03-06 19:16:12 -08:00
Dan Smith
fdf1ace37f Images for #4269 2017-03-06 19:15:07 -08:00
Dan Smith
b3f4f5feca Add support for Jetstream JT270MH
Thanks to Jetstream for donating a radio!

Fixes #4219
2016-10-28 05:24:20 -07:00
Dan Smith
caff389c6b Add RT22 image from Jim
Related to #4145
2016-11-16 20:23:27 -08:00
Dan Smith
e98db5d799 Add test image for Alinco DJ-G7
Related to #699
2016-11-15 14:29:32 -08:00
Dan Smith
cf43ca6a0c Remove test images after each run
This avoids filling /tmp with test images.

Reverting the patch for #4051 made me trip over this.
2016-11-01 18:42:18 -07:00
Dan Smith
e997d64eae Add test image for Retevis RT21 from Jim
#4139
2016-10-16 16:55:56 -07:00
Jim Unroe
9afc25406e [GMRS-V1] Update Model Name
This patch corrects the model name of the BTech GMRS-V1.

related to #4119
2016-10-10 17:25:49 -04:00
Jim Unroe
49fd6ddb9c [New Model] BTech GMRS-UV1
This patch adds support for the BTech GMRS-UV1

#4119
2016-10-08 22:21:27 -04:00
Dan Smith
775dd7ee32 Make tests check validate_memory()
This makes the BruteForce test check validate_memory() before trying
to set it in the radio and subsequently failing. If a radio doesn't
validate a memory it may have some weird requirements. Also, make
the edges test try to use the first mode out of the valid_modes list
instead of the default 'FM'.

Related to issue #4119
2016-10-09 14:50:56 -07:00
Dan Smith
0a89d80410 Add test image for PX-888K
Related to #288
2016-09-27 11:42:29 -07:00
Dan Smith
930b5098f6 Add test image for VV-898S
#3889, #3327, #3065.
2016-09-08 20:57:54 -07:00