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;