From 207d485b6b6c2af685ffac43e6c06e3367963fe4 Mon Sep 17 00:00:00 2001 From: "Thomas Beierlein, DL1JBE" Date: Sun, 9 Nov 2008 14:26:04 +0000 Subject: [PATCH] Made a comment that 'make check' needs an installed hamlib library. git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2474 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- INSTALL | 3 +++ README.developer | 4 ++-- icom/frame.c | 24 ++++++++++++++++++------ icom/icom_defs.h | 15 +++++++++++---- tests/README | 2 +- tests/listrigs.c | 8 ++++---- 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/INSTALL b/INSTALL index be9761c73..62dee4413 100644 --- a/INSTALL +++ b/INSTALL @@ -51,6 +51,9 @@ main directory and do the following: $ make check + Be careful: 'make check' needs an already installed hamlib library. That + means that this step has to wait until you finished step 4 (and 5). + 4. Type `make install' to install the programs and any data files and documentation. Type `make uninstall' to undo the installation. diff --git a/README.developer b/README.developer index d95690dc7..0c6d1ecd8 100644 --- a/README.developer +++ b/README.developer @@ -301,7 +301,7 @@ So far, Hamlib has been tested successfully under the following systems: may be composed. -3. How to add a new model to and existing backend +3. How to add a new model to an existing backend 3.1. make sure there's already a (unique) ID for the model to be added in include/hamlib/riglist.h @@ -315,7 +315,7 @@ So far, Hamlib has been tested successfully under the following systems: 3.6. In initrigs_ of mybackend.c, add "rig_register(&_caps);" - 3.7. Run `make' if you have dependencies, or the following to regenerate + 3.7. Run `make' if you have dependencies, or the following to regenerate the makefile: $ automake mybackend/Makefile $ CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=mybackend/Makefile ./config.status diff --git a/icom/frame.c b/icom/frame.c index 11eb8951c..6e80c03d9 100644 --- a/icom/frame.c +++ b/icom/frame.c @@ -2,7 +2,7 @@ * Hamlib CI-V backend - low level communication routines * Copyright (c) 2000-2006 by Stephane Fillod * - * $Id: frame.c,v 1.33 2008-11-02 16:26:55 fillods Exp $ + * $Id: frame.c,v 1.34 2008-11-09 14:26:04 y32kn Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -336,18 +336,30 @@ int rig2icom_mode(RIG *rig, rmode_t mode, pbwidth_t width, medium_width = rig_passband_normal(rig, mode); if (width == medium_width || width == RIG_PASSBAND_NORMAL) - icmode_ext = -1; /* medium, no passband data-> rig default. Is medium always the default? */ - else if (width < medium_width) - icmode_ext = PD_NARROW; + icmode_ext = -1; /* medium, no passband data + -> rig default. Is medium + always the default? */ else - icmode_ext = PD_WIDE; + if (rig_passband_wide(rig, mode) != 0) /* Wide mode defined + -> rig with 3 codings */ + { + if (width < medium_width) + icmode_ext = PD_NARROW_3; + else + icmode_ext = PD_WIDE_3; + } else { /* rig with 2 codings */ + if (width < medium_width) + icmode_ext = PD_NARROW_2; + else + icmode_ext = -1; /* no wide mode */ + } /* -> use default */ if (rig->caps->rig_model == RIG_MODEL_ICR7000) { if (mode == RIG_MODE_USB || mode == RIG_MODE_LSB) { icmode = S_R7000_SSB; icmode_ext = 0x00; } else if (mode == RIG_MODE_AM && icmode_ext == -1) { - icmode_ext = PD_WIDE; /* default to Wide */ + icmode_ext = PD_WIDE_3; /* default to Wide */ } } diff --git a/icom/icom_defs.h b/icom/icom_defs.h index 5b136ab54..86bf44815 100644 --- a/icom/icom_defs.h +++ b/icom/icom_defs.h @@ -2,7 +2,7 @@ * Hamlib CI-V backend - defines for the ICOM "CI-V" interface. * Copyright (c) 2000-2004 by Stephane Fillod * - * $Id: icom_defs.h,v 1.20 2008-03-31 14:22:57 aa6e Exp $ + * $Id: icom_defs.h,v 1.21 2008-11-09 14:26:04 y32kn Exp $ * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as @@ -117,9 +117,16 @@ #define S_PSKR 0x13 /* 7800 PSK LSB */ #define S_R7000_SSB 0x05 /* Set to SSB on R-7000 */ -#define PD_WIDE 0x01 /* Wide */ -#define PD_MEDIUM 0x02 /* Medium */ -#define PD_NARROW 0x03 /* Narrow */ + +/* filter width coding for older ICOM rigs with 2 filter width */ +/* there is no special 'wide' for that rigs */ +#define PD_MEDIUM_2 0x01 /* Medium */ +#define PD_NARROW_2 0x02 /* Narrow */ + +/* filter width coding for newer ICOM rigs with 3 filter width */ +#define PD_WIDE_3 0x01 /* Wide */ +#define PD_MEDIUM_3 0x02 /* Medium */ +#define PD_NARROW_3 0x03 /* Narrow */ /* * Set VFO (C_SET_VFO) sub commands diff --git a/tests/README b/tests/README index a88a95d0b..79cffd5a5 100644 --- a/tests/README +++ b/tests/README @@ -31,5 +31,5 @@ testrig - Sample program calling common API calls, uses rig_probe testtrn - Sample program using event notification (transceive mode) rigctl - Combined tool to execute any call of the API, see man page rigmem - Combined tool to load/save content of rig memory, see man page -rotctl - Similar to 'rigctl' but for rotators, see man page +rotctl - Similar to 'rigctl' but for rotators, see man page diff --git a/tests/listrigs.c b/tests/listrigs.c index 273bbfa35..a12e97bf7 100644 --- a/tests/listrigs.c +++ b/tests/listrigs.c @@ -3,7 +3,7 @@ * This programs list all the available the rig capabilities. * * - * $Id: listrigs.c,v 1.12 2008-10-25 11:10:24 fillods Exp $ + * $Id: listrigs.c,v 1.13 2008-11-09 14:26:04 y32kn Exp $ * * * This program is free software; you can redistribute it and/or @@ -33,10 +33,10 @@ int print_caps_sum(const struct rig_caps *caps, void *data) { - printf("%d\t%s\t%-12s\t%s\t",caps->rig_model,caps->mfg_name, + printf("%d\t%-10s\t%-12s\t%s\t",caps->rig_model,caps->mfg_name, caps->model_name, caps->version); - printf("%s\t", rig_strstatus(caps->status)); + printf("%-10s\t", rig_strstatus(caps->status)); switch (caps->rig_type & RIG_TYPE_MASK) { case RIG_TYPE_TRANSCEIVER: printf("Transceiver\n"); @@ -78,7 +78,7 @@ int main (int argc, char *argv[]) rig_load_all_backends(); - printf("Rig#\tMfg\tModel \tVers.\tStatus\tType\n"); + printf("Rig#\tMfg \tModel \tVers.\tStatus \tType\n"); status = rig_list_foreach(print_caps_sum,NULL); if (status != RIG_OK ) { printf("rig_list_foreach: error = %s \n", rigerror(status));