diff --git a/alinco/alinco.c b/alinco/alinco.c index e6094580b..aecc96f46 100644 --- a/alinco/alinco.c +++ b/alinco/alinco.c @@ -6,7 +6,7 @@ * via serial interface to a Kenwood radio. * * - * $Id: alinco.c,v 1.3 2001-06-12 07:07:10 f4cfe Exp $ + * $Id: alinco.c,v 1.4 2001-06-27 17:32:47 f4cfe Exp $ * * * @@ -388,7 +388,7 @@ int alinco_get_split(RIG *rig, vfo_t vfo, split_t *split) * alinco_set_split_freq * Assumes rig!=NULL */ -int alinco_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) +int alinco_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { char freqbuf[16]; int freq_len; @@ -398,10 +398,6 @@ int alinco_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) if (tx_freq >= GHz(10)) return -RIG_EINVAL; - retval = alinco_set_freq(rig, vfo, rx_freq); - if (retval != RIG_OK) - return retval; - /* at least 6 digits */ freq_len = sprintf(freqbuf, AL CMD_TXFREQ "%06Ld" EOM, tx_freq); @@ -414,7 +410,7 @@ int alinco_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) * alinco_get_split_freq * Assumes rig!=NULL, rx_freq!=NULL, tx_freq!=NULL */ -int alinco_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) +int alinco_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { int retval; char freqbuf[32]; @@ -427,10 +423,6 @@ int alinco_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) freqbuf[26] = '\0'; sscanf(freqbuf+16, "%Ld", tx_freq); - /* extract RX freq */ - freqbuf[16] = '\0'; - sscanf(freqbuf+6, "%Ld", rx_freq); - return RIG_OK; } diff --git a/alinco/alinco.h b/alinco/alinco.h index 64f872f42..32d1ff14f 100644 --- a/alinco/alinco.h +++ b/alinco/alinco.h @@ -6,7 +6,7 @@ * via serial interface to a Alinco radio. * * - * $Id: alinco.h,v 1.3 2001-06-20 06:08:21 f4cfe Exp $ + * $Id: alinco.h,v 1.4 2001-06-27 17:32:47 f4cfe Exp $ * * * This program is free software; you can redistribute it and/or @@ -51,8 +51,8 @@ int alinco_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width); int alinco_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width); int alinco_set_split(RIG *rig, vfo_t vfo, split_t split); int alinco_get_split(RIG *rig, vfo_t vfo, split_t *split); -int alinco_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq); -int alinco_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq); +int alinco_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq); +int alinco_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq); int alinco_set_func(RIG *rig, vfo_t vfo, setting_t func, int status); int alinco_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status); int alinco_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val); diff --git a/dummy/dummy.c b/dummy/dummy.c index 417c9933f..f07e1ff75 100644 --- a/dummy/dummy.c +++ b/dummy/dummy.c @@ -7,7 +7,7 @@ * purpose mainly. * * - * $Id: dummy.c,v 1.12 2001-06-20 06:08:21 f4cfe Exp $ + * $Id: dummy.c,v 1.13 2001-06-27 17:32:47 f4cfe Exp $ * * * This program is free software; you can redistribute it and/or @@ -323,7 +323,7 @@ static int dummy_get_dcs_sql(RIG *rig, vfo_t vfo, unsigned int *code) } -static int dummy_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) +static int dummy_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n"); @@ -331,21 +331,21 @@ static int dummy_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_f } -static int dummy_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) +static int dummy_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n"); return RIG_OK; } -static int dummy_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width) +static int dummy_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) { rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n"); return RIG_OK; } -static int dummy_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width) +static int dummy_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width) { rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n"); diff --git a/icom/icom.c b/icom/icom.c index 8aab76c4b..edf3d2888 100644 --- a/icom/icom.c +++ b/icom/icom.c @@ -6,7 +6,7 @@ * via serial interface to an ICOM using the "CI-V" interface. * * - * $Id: icom.c,v 1.32 2001-06-26 20:55:28 f4cfe Exp $ + * $Id: icom.c,v 1.33 2001-06-27 17:32:47 f4cfe Exp $ * * * @@ -1080,14 +1080,22 @@ int icom_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) * icom_set_vfo,icom_set_freq works for this rig * FIXME: status */ -int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) +int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { int status; status = icom_set_vfo(rig, RIG_VFO_B); - status |= icom_set_freq(rig, RIG_VFO_CURR, tx_freq); - status |= icom_set_vfo(rig, RIG_VFO_A); - status |= icom_set_freq(rig, RIG_VFO_CURR, rx_freq); + if (status != RIG_OK) + return status; + + status = icom_set_freq(rig, RIG_VFO_CURR, tx_freq); + if (status != RIG_OK) + return status; + + status = icom_set_vfo(rig, RIG_VFO_A); + if (status != RIG_OK) + return status; + return status; } @@ -1098,14 +1106,21 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) * icom_set_vfo,icom_get_freq works for this rig * FIXME: status */ -int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) +int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { int status; status = icom_set_vfo(rig, RIG_VFO_B); - status |= icom_get_freq(rig, RIG_VFO_CURR, tx_freq); - status |= icom_set_vfo(rig, RIG_VFO_A); - status |= icom_get_freq(rig, RIG_VFO_CURR, rx_freq); + if (status != RIG_OK) + return status; + + status = icom_get_freq(rig, RIG_VFO_CURR, tx_freq); + if (status != RIG_OK) + return status; + + status = icom_set_vfo(rig, RIG_VFO_A); + if (status != RIG_OK) + return status; return status; } @@ -1116,14 +1131,21 @@ int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) * icom_set_vfo,icom_set_mode works for this rig * FIXME: status */ -int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width) +int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) { int status; status = icom_set_vfo(rig, RIG_VFO_B); - status |= icom_set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width); - status |= icom_set_vfo(rig, RIG_VFO_A); - status |= icom_set_mode(rig, RIG_VFO_CURR, rx_mode, rx_width); + if (status != RIG_OK) + return status; + + status = icom_set_mode(rig, RIG_VFO_CURR, tx_mode, tx_width); + if (status != RIG_OK) + return status; + + status = icom_set_vfo(rig, RIG_VFO_A); + if (status != RIG_OK) + return status; return status; } @@ -1135,14 +1157,21 @@ int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width * icom_set_vfo,icom_get_mode works for this rig * FIXME: status */ -int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width) +int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width) { int status; status = icom_set_vfo(rig, RIG_VFO_B); + if (status != RIG_OK) + return status; + status |= icom_get_mode(rig, RIG_VFO_CURR, tx_mode, tx_width); + if (status != RIG_OK) + return status; + status |= icom_set_vfo(rig, RIG_VFO_A); - status |= icom_get_mode(rig, RIG_VFO_CURR, rx_mode, rx_width); + if (status != RIG_OK) + return status; return status; } diff --git a/icom/icom.h b/icom/icom.h index 54c0218d2..cc7f686cc 100644 --- a/icom/icom.h +++ b/icom/icom.h @@ -6,7 +6,7 @@ * via serial interface to an ICOM using the "CI-V" interface. * * - * $Id: icom.h,v 1.22 2001-06-26 20:55:29 f4cfe Exp $ + * $Id: icom.h,v 1.23 2001-06-27 17:32:47 f4cfe Exp $ * * * This program is free software; you can redistribute it and/or @@ -77,10 +77,10 @@ int icom_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift); int icom_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift); int icom_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs); int icom_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs); -int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq); -int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq); -int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width); -int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width); +int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq); +int icom_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq); +int icom_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width); +int icom_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width); int icom_set_split(RIG *rig, vfo_t vfo, split_t split); int icom_get_split(RIG *rig, vfo_t vfo, split_t *split); int icom_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts); diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 48f5711e3..428f15e82 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -5,7 +5,7 @@ * will be used for obtaining rig capabilities. * * - * $Id: rig.h,v 1.42 2001-06-26 20:55:28 f4cfe Exp $ + * $Id: rig.h,v 1.43 2001-06-27 17:32:47 f4cfe Exp $ * * * This program is free software; you can redistribute it and/or @@ -768,10 +768,10 @@ struct rig_caps { int (*set_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t offs); int (*get_rptr_offs)(RIG *rig, vfo_t vfo, shortfreq_t *offs); - int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq); - int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq); - int (*set_split_mode)(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width); - int (*get_split_mode)(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width); + int (*set_split_freq)(RIG *rig, vfo_t vfo, freq_t tx_freq); + int (*get_split_freq)(RIG *rig, vfo_t vfo, freq_t *tx_freq); + int (*set_split_mode)(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width); + int (*get_split_mode)(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width); int (*set_split)(RIG *rig, vfo_t vfo, split_t split); int (*get_split)(RIG *rig, vfo_t vfo, split_t *split); @@ -1054,10 +1054,10 @@ extern HAMLIB_EXPORT(int) rig_get_ctcss_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, extern HAMLIB_EXPORT(int) rig_set_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t code)); extern HAMLIB_EXPORT(int) rig_get_dcs_sql HAMLIB_PARAMS((RIG *rig, vfo_t vfo, tone_t *code)); -extern HAMLIB_EXPORT(int) rig_set_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq)); -extern HAMLIB_EXPORT(int) rig_get_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq)); -extern HAMLIB_EXPORT(int) rig_set_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width)); -extern HAMLIB_EXPORT(int) rig_get_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width)); +extern HAMLIB_EXPORT(int) rig_set_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t tx_freq)); +extern HAMLIB_EXPORT(int) rig_get_split_freq HAMLIB_PARAMS((RIG *rig, vfo_t vfo, freq_t *tx_freq)); +extern HAMLIB_EXPORT(int) rig_set_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width)); +extern HAMLIB_EXPORT(int) rig_get_split_mode HAMLIB_PARAMS((RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width)); extern HAMLIB_EXPORT(int) rig_set_split HAMLIB_PARAMS((RIG *rig, vfo_t vfo, split_t split)); extern HAMLIB_EXPORT(int) rig_get_split HAMLIB_PARAMS((RIG *rig, vfo_t vfo, split_t *split)); diff --git a/src/rig.c b/src/rig.c index 9a02800a8..98454cc2e 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2,7 +2,7 @@ Copyright (C) 2000,2001 Stephane Fillod and Frank Singleton This file is part of the hamlib package. - $Id: rig.c,v 1.37 2001-06-26 20:55:28 f4cfe Exp $ + $Id: rig.c,v 1.38 2001-06-27 17:32:47 f4cfe Exp $ Hamlib is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1334,7 +1334,6 @@ int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) * rig_set_split_freq - set the split frequencies * @rig: The rig handle * @vfo: The target VFO - * @rx_freq: The receive split frequency to set to * @tx_freq: The transmit split frequency to set to * * The rig_set_split_freq() function sets the split frequencies. @@ -1346,7 +1345,7 @@ int rig_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs) * SEE ALSO: rig_get_split_freq() */ -int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) +int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) { const struct rig_caps *caps; int retcode; @@ -1362,7 +1361,7 @@ int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) if (caps->targetable_vfo || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) - return caps->set_split_freq(rig, vfo, rx_freq, tx_freq); + return caps->set_split_freq(rig, vfo, tx_freq); if (!caps->set_vfo) return -RIG_ENTARGET; @@ -1371,7 +1370,7 @@ int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) if (retcode != RIG_OK) return retcode; - retcode = caps->set_split_freq(rig, vfo, rx_freq, tx_freq); + retcode = caps->set_split_freq(rig, vfo, tx_freq); caps->set_vfo(rig, curr_vfo); return retcode; } @@ -1380,7 +1379,6 @@ int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) * rig_get_split_freq - get the current split frequencies * @rig: The rig handle * @vfo: The target VFO - * @rx_freq: The location where to store the current receive split frequency * @tx_freq: The location where to store the current transmit split frequency * * The rig_get_split_freq() function retrieves the current split @@ -1392,13 +1390,13 @@ int rig_set_split_freq(RIG *rig, vfo_t vfo, freq_t rx_freq, freq_t tx_freq) * * SEE ALSO: rig_set_split_freq() */ -int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) +int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq) { const struct rig_caps *caps; int retcode; vfo_t curr_vfo; - if (!rig || !rig->caps || !rx_freq || !tx_freq) + if (!rig || !rig->caps || !tx_freq) return -RIG_EINVAL; caps = rig->caps; @@ -1408,7 +1406,7 @@ int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) if (caps->targetable_vfo || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) - return caps->get_split_freq(rig, vfo, rx_freq, tx_freq); + return caps->get_split_freq(rig, vfo, tx_freq); if (!caps->set_vfo) return -RIG_ENTARGET; @@ -1417,7 +1415,7 @@ int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) if (retcode != RIG_OK) return retcode; - retcode = caps->get_split_freq(rig, vfo, rx_freq, tx_freq); + retcode = caps->get_split_freq(rig, vfo, tx_freq); caps->set_vfo(rig, curr_vfo); return retcode; } @@ -1426,8 +1424,6 @@ int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) * rig_set_split_mode - set the split modes * @rig: The rig handle * @vfo: The target VFO - * @rx_mode: The receive split mode to set to - * @rx_width: The receive split width to set to * @tx_mode: The transmit split mode to set to * @tx_width: The transmit split width to set to * @@ -1440,7 +1436,7 @@ int rig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *rx_freq, freq_t *tx_freq) * SEE ALSO: rig_get_split_mode() */ -int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, rmode_t tx_mode, pbwidth_t tx_width) +int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_width) { const struct rig_caps *caps; int retcode; @@ -1456,8 +1452,7 @@ int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, if (caps->targetable_vfo || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) - return caps->set_split_mode(rig, vfo, rx_mode, rx_width, - tx_mode, tx_width); + return caps->set_split_mode(rig, vfo, tx_mode, tx_width); if (!caps->set_vfo) return -RIG_ENTARGET; @@ -1466,8 +1461,7 @@ int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, if (retcode != RIG_OK) return retcode; - retcode = caps->set_split_mode(rig, vfo, rx_mode, rx_width, - tx_mode, tx_width); + retcode = caps->set_split_mode(rig, vfo, tx_mode, tx_width); caps->set_vfo(rig, curr_vfo); return retcode; } @@ -1476,8 +1470,6 @@ int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, * rig_get_split_mode - get the current split modes * @rig: The rig handle * @vfo: The target VFO - * @rx_mode: The location where to store the current receive split mode - * @rx_width: The location where to store the current receive split width * @tx_mode: The location where to store the current transmit split mode * @tx_width: The location where to store the current transmit split width * @@ -1490,14 +1482,13 @@ int rig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t rx_mode, pbwidth_t rx_width, * * SEE ALSO: rig_set_split_mode() */ -int rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_width, rmode_t *tx_mode, pbwidth_t *tx_width) +int rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode, pbwidth_t *tx_width) { const struct rig_caps *caps; int retcode; vfo_t curr_vfo; - if (!rig || !rig->caps || !rx_mode || !rx_width || - !tx_mode || !tx_width) + if (!rig || !rig->caps || !tx_mode || !tx_width) return -RIG_EINVAL; caps = rig->caps; @@ -1507,8 +1498,7 @@ int rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_widt if (caps->targetable_vfo || vfo == RIG_VFO_CURR || vfo == rig->state.current_vfo) - return caps->get_split_mode(rig, vfo, rx_mode, rx_width, - tx_mode, tx_width); + return caps->get_split_mode(rig, vfo, tx_mode, tx_width); if (!caps->set_vfo) return -RIG_ENTARGET; @@ -1517,8 +1507,7 @@ int rig_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *rx_mode, pbwidth_t *rx_widt if (retcode != RIG_OK) return retcode; - retcode = caps->get_split_mode(rig, vfo, rx_mode, rx_width, - tx_mode, tx_width); + retcode = caps->get_split_mode(rig, vfo, tx_mode, tx_width); caps->set_vfo(rig, curr_vfo); return retcode; } @@ -3521,9 +3510,8 @@ int rig_save_channel(RIG *rig, channel_t *chan) rig_get_mode(rig, RIG_VFO_CURR, &chan->mode, &chan->width); rig_get_split(rig, RIG_VFO_CURR, &chan->split); if (chan->split != RIG_SPLIT_OFF) { - rig_get_split_freq(rig, RIG_VFO_CURR, &chan->freq, &chan->tx_freq); - rig_get_split_mode(rig, RIG_VFO_CURR, &chan->mode, &chan->width, - &chan->tx_mode, &chan->tx_width); + rig_get_split_freq(rig, RIG_VFO_CURR, &chan->tx_freq); + rig_get_split_mode(rig, RIG_VFO_CURR, &chan->tx_mode, &chan->tx_width); } rig_get_rptr_shift(rig, RIG_VFO_CURR, &chan->rptr_shift); rig_get_rptr_offs(rig, RIG_VFO_CURR, &chan->rptr_offs); @@ -3587,9 +3575,8 @@ int rig_restore_channel(RIG *rig, const channel_t *chan) rig_set_mode(rig, RIG_VFO_CURR, chan->mode, chan->width); rig_set_split(rig, RIG_VFO_CURR, chan->split); if (chan->split != RIG_SPLIT_OFF) { - rig_set_split_freq(rig, RIG_VFO_CURR, chan->freq, chan->tx_freq); - rig_set_split_mode(rig, RIG_VFO_CURR, chan->mode, chan->width, - chan->tx_mode, chan->tx_width); + rig_set_split_freq(rig, RIG_VFO_CURR, chan->tx_freq); + rig_set_split_mode(rig, RIG_VFO_CURR, chan->tx_mode, chan->tx_width); } rig_set_rptr_shift(rig, RIG_VFO_CURR, chan->rptr_shift); rig_set_rptr_offs(rig, RIG_VFO_CURR, chan->rptr_offs); diff --git a/tests/rigctl.c b/tests/rigctl.c index fcdace742..231e3dfb6 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -7,7 +7,7 @@ * TODO: be more generic and add command line option to run * in non-interactive mode * - * $Id: rigctl.c,v 1.16 2001-06-26 20:55:28 f4cfe Exp $ + * $Id: rigctl.c,v 1.17 2001-06-27 17:32:47 f4cfe Exp $ * * * This program is free software; you can redistribute it and/or @@ -119,8 +119,8 @@ struct test_table test_list[] = { { 'c', "get_ctcss", get_ctcss, "CTCSS tone" }, { 'D', "set_dcs", set_dcs, "DCS code" }, { 'd', "get_dcs", get_dcs, "DCS code" }, - { 'I', "set_split_freq", set_split_freq, "Rx frequency", "Tx frequency" }, - { 'i', "get_split_freq", get_split_freq, "Rx frequency", "Tx frequency" }, + { 'I', "set_split_freq", set_split_freq, "Tx frequency" }, + { 'i', "get_split_freq", get_split_freq, "Tx frequency" }, { 'S', "set_split", set_split, "Split mode" }, { 's', "get_split", get_split, "Split mode" }, { 'N', "set_ts", set_ts, "Tuning step" }, @@ -513,25 +513,21 @@ declare_proto_rig(get_dcs) declare_proto_rig(set_split_freq) { - freq_t rxfreq,txfreq; + freq_t txfreq; - sscanf(arg2, "%lld", &rxfreq); - sscanf(arg2, "%lld", &txfreq); - return rig_set_split_freq(rig, RIG_VFO_CURR, rxfreq, txfreq); + sscanf(arg1, "%lld", &txfreq); + return rig_set_split_freq(rig, RIG_VFO_CURR, txfreq); } declare_proto_rig(get_split_freq) { int status; - freq_t rxfreq,txfreq; + freq_t txfreq; - status = rig_get_split_freq(rig, RIG_VFO_CURR, &rxfreq, &txfreq); + status = rig_get_split_freq(rig, RIG_VFO_CURR, &txfreq); if (interactive) printf("%s: ", cmd->name1); - printf("%lld\n", rxfreq); - if (interactive) - printf("%s: ", cmd->name2); printf("%lld\n", txfreq); return status; }