From 11baf8ecfbe7a90bc2277ca3aee6669a77e669d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Fillod=2C=20F8CFE?= Date: Wed, 10 Jul 2002 21:34:53 +0000 Subject: [PATCH] fixed support for new vfo param in get_channel git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1119 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- tests/dumpmem.c | 3 ++- tests/rigctl.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/dumpmem.c b/tests/dumpmem.c index 0f645b115..20cbd81c4 100644 --- a/tests/dumpmem.c +++ b/tests/dumpmem.c @@ -3,7 +3,7 @@ * This programs dumps the mmeory contents of a rig. * * - * $Id: dumpmem.c,v 1.7 2002-01-27 23:55:45 fillods Exp $ + * $Id: dumpmem.c,v 1.8 2002-07-10 21:34:53 fillods Exp $ * * * This program is free software; you can redistribute it and/or @@ -121,6 +121,7 @@ int dump_chan(RIG *rig, int chan_num) int status; char freqbuf[20]; + chan.vfo = RIG_VFO_MEM; chan.channel_num = chan_num; status=rig_get_channel(rig, &chan); diff --git a/tests/rigctl.c b/tests/rigctl.c index 034fde8ae..5e4d25a7a 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -5,7 +5,7 @@ * It takes commands in interactive mode as well as * from command line options. * - * $Id: rigctl.c,v 1.31 2002-07-09 20:40:28 fillods Exp $ + * $Id: rigctl.c,v 1.32 2002-07-10 21:34:53 fillods Exp $ * * * This program is free software; you can redistribute it and/or @@ -1252,8 +1252,17 @@ declare_proto_rig(get_channel) { int status; channel_t chan; + vfo_t vfo; - sscanf(arg1, "%d", &chan.channel_num); + vfo = parse_vfo(arg1); + if (vfo != RIG_VFO_CURR) { + vfo = RIG_VFO_MEM; + if (sscanf(arg1, "%d", &chan.channel_num) != 1) + return -RIG_EINVAL; + } else + chan.channel_num = 0; + + chan.vfo = vfo; status = rig_get_channel(rig, &chan); if (status != RIG_OK) return status;