Commit Graph

36 Commits

Author SHA1 Message Date
Dan Smith
17e39b7bde Add back the easy chirpc runner 2023-01-14 07:45:56 -08:00
Dan Smith
ad432cc9ed Formalize chirpc a bit and install it
This moves chirpc into a package called chirp.cli and makes setup.py
install it as a binary. This will make it available to people that
install the package and also makes it possible to add tests.

Tangentially related to #10263
2023-01-14 07:45:56 -08:00
Stuart Longland
64103c577c chirpc: Fix setting tone modes
The API for the memory channel object has changed, and so now `chirpc`
references attributes that no longer exist.  The following commit has
only been tested using "TEnc" (Tone Encode) mode, but should at least
allow restoration of basic repeater manipulation functionality.

Fixes: #10263.
2023-01-13 15:58:36 -08:00
Martin Cooper
cc6b8b44cc Bring chirpc up to date with recent py3 changes 2022-12-19 11:22:05 -08:00
Dan Smith
3792acf9dc Merge branch 'master' into py3
This looks like a lot of change, but it was pretty trivial. Many
of the conflicts came from d40963b3ed
which fixed a bunch of typos. There were some test adapter changes,
some GTK UI fixes, RR canada additions, and the usual driver
maintenance.

I didn't test the GTK UI since it seems like we're abandoning keeping
that working in python2 or python3 with pygobject (which is fine).
2022-09-09 14:04:46 -07:00
Daniele Forsi
d40963b3ed Fix spelling
Fixed with:
codespell --skip=locale,./chirp/ui/fips.py --ignore-words-list=ans,parm,parms,rcall,sav,ser,setts,wth --summary --write-changes --interactive=2
2022-08-09 14:19:03 +02:00
Martin Cooper
5e838824d3 Fix broken chirpc setter commands
Setter commands using custom actions were broken in a number of
ways. Update custom action classes to make them work.
Fixes #9423
2021-10-10 15:42:20 -07:00
Martin Cooper
945179e115 Fix broken chirpc setter commands
Setter commands using custom actions were broken in a number of
ways. Update custom action classes to make them work.
Fixes #9423
2021-10-05 19:14:44 -07:00
Martin Cooper
ad056e984b Fix print call after merge 2021-10-01 13:23:20 -07:00
Dan Smith
299538c723 Allow integer settings in mem.extra
Needed for #6769
2021-10-01 10:21:26 -07:00
Martin Cooper
1cffa74d71 Fix Icom radio detection
Icom radio detection has been broken for a long time, because the
detection code is expecting to be passed a radio instance, but is
being passed a serial port instead. Since we are trying to determine
the model, we don't have the relevant class yet. Instead, create a
minimal radio instance to allow us to query for the model.

These changes fix both the 'Detect' option in the 'Download From
Radio' menu and the 'chirpc --id' command.

Fixes #7905
2021-10-01 10:16:05 -07:00
Dan Smith
c44fa3dca2 Allow integer settings in mem.extra
Needed for #6769
2021-07-30 18:33:34 -07:00
Martin Cooper
1e8e4c75f7 Fix Icom radio detection
Icom radio detection has been broken for a long time, because the
detection code is expecting to be passed a radio instance, but is
being passed a serial port instead. Since we are trying to determine
the model, we don't have the relevant class yet. Instead, create a
minimal radio instance to allow us to query for the model.

These changes fix both the 'Detect' option in the 'Download From
Radio' menu and the 'chirpc --id' command.

Fixes #7905
2020-07-24 09:09:34 -07:00
Dan Smith
c1ef01e4e3 [py3] Generalize the safe import routine
#495
2019-02-10 10:13:49 -08:00
Dan Smith
10d0f7f2d4 Fix some style and unittest regressions in recent patches
#495
2019-02-09 09:44:05 -08:00
Dan Smith
759c90c830 [py3] 2to3 for chirpc and quick import * hack
Also fixed float division in the chirp_common.Status so that chirpc will work

#495
2019-02-08 13:15:15 -08:00
Marco Filippi
9310c5b2af [chirpc] Allow deleting an already empty memory
On some radio (eg ft817) empty channels can contain valid data, deleting again
such a memory usually clean data

Improves #2343
2015-03-18 15:04:07 +01:00
Marco Filippi
ddd2281895 [chirpc] Allow memnum arg to be a string to access special channels
Special channels are identified by extd_number which can be a string

Improves #2343
2015-03-18 15:04:04 +01:00
Marco Filippi
061c291efe [chirpc] Add --list-special-mem
Add to chirpc the capability to list special channels if any
The string memory representation have been changed to print the extd_number when
present instead of number

Improves #2343
2015-03-18 14:44:32 +01:00
Zachary T Welch
ebd6c7c970 chirpc: add --copy-mem option (#2343)
This patch adds an option that permits copying a memory channel.
2015-03-09 06:55:04 -07:00
Zachary T Welch
8336361662 chirpc: add --clear-mem option (#2343)
This patch gives the CLI the means of clearing a memory channel.
2015-03-09 06:55:03 -07:00
Zachary T Welch
28b131ea20 chirpc: make mem options more robust (#2343)
This patch makes the memory options more robust to a bad memory number
argument and some other exceptions.  It also fixes a bug that prevented
setting an empty channel.  Finally, it avoids overwriting the image file
when performaning a memory query.
2015-03-09 06:54:55 -07:00
Zachary T Welch
92092b3221 chirpc: add --list-mem (#2343)
This patch allows the CLI to print out the entire list of memories.
If --verbose is given, it displays empty slots too; otherwise, only
non-empty memories are displayed.
2015-03-09 06:54:38 -07:00
Zachary T Welch
7664d8ee84 chirpc: add --list-settings (#2343)
This patch allows the CLI to print out the radio's current settings.
2015-03-09 06:54:35 -07:00
Zachary T Welch
5fd33d2e7d chirpc: add memory option group (#2343)
This patch groups the memory/channel modification options into an
argument group, making the --help text easier to digest.  It also
eliminates redundant arguments to the relevant add_argument calls,
since those lines are being touched anyway.
2015-03-09 06:53:52 -07:00
Zach Welch
0c32ba23b7 Improve CLI download/upload (#2343)
This patch adds much-needed checks in the CLI, allowing an unwitting
user to stumble their way toward a working set of options that permits
downloading/uploading an image from/to a radio.
2015-03-09 06:53:29 -07:00
Zach Welch
1be257483e Move drivers into chirp/drivers/ (#2351)
CHIRP now supports enough devices that the chirp/ directory has become
cluttered.  This creates unnecessary coupling when importing all of
these modules.  This patch moves all of the drivers to their own
directory and then chases down all of the stale import references.
2015-03-03 07:09:37 -08:00
Zach Welch
5a64e2d65e Use logging in chirp[cw] (#2347) 2015-03-02 14:19:53 -08:00
Zach Welch
1d662c6ad9 Update cpep8 to use pep8 1.6.2 (#2355)
This patch updates the virtualenv version of pep8 to 1.6.2, chasing
down the new style errors that pop up in the already cleaned files.
2015-02-28 16:29:01 -08:00
Zach Welch
9274b000a0 Fix style issues (1/4) (#2355)
This patch contains whitespace-only changes that eliminate all of the
PEP8 style warnings in the CLI and GUI scripts.
2015-02-27 15:54:08 -08:00
Zach Welch
fdd14b9b8a Fix chirp.logger module (#2347)
This patch addresses some issues with the chirp.logger module in order
to use it in chirpc and chirpw.  It prints the version string when
logging at DEBUG level.

In addition, it embraces and extends the "debug.log" support that was
present in chirpw, ensuring all log messages and output end up in that
file when running on Win32 or MacOS hosts.  It also allows that feature
to be tested on Linux by setting CHIRP_DEBUG_LOG in the environment.
2015-02-27 15:46:51 -08:00
Dan Smith
344f1129ed Revert r2380 since it removed logging the current version.
Related to #2347
2015-02-26 17:28:00 -08:00
Zach Welch
83ee9bd12b Add chirp.logger module (#2347)
This patch adds the chirp.logger module, using it in chirpc and chirpw.
It adds a handful of optional command line arguments to control the new
logging features.  In addition, CHIRP_DEBUG, CHIRP_LOG, and
CHIRP_LOG_LEVEL can be used to control the logging features from the
environment.

It also makes the version string reusable between the GUI and CLI, and
it prints that string at the start of the log file (if in use).
2015-02-26 16:10:39 -08:00
Zach Welch
97c9809394 chirpc: add --list-radios option (#2343)
The current list of radios is too long to present to the user in
the --help text, so this splits the list out into its own option.
2015-02-25 08:17:24 -08:00
Zach Welch
319a568c65 Update chirpc argument parsing (#2343)
The optparse module is deprecated, so this patch converts chirpc to use
the argparse module.  This allows chirpc and chirpw to share argument
parsing code.
2015-02-25 08:16:53 -08:00
Zach Welch
6b5a1ec2b3 Rename chirp.py as chirpc (#2343)
The chirp CLI needs a better name if it ever will be installed in PATH.
It is better to do that early on rather than later.
2015-02-25 07:42:05 -08:00