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
Hamlib-1.1.4
Stéphane Fillod, F8CFE 2002-07-10 21:34:53 +00:00
rodzic b024552a03
commit 11baf8ecfb
2 zmienionych plików z 13 dodań i 3 usunięć

Wyświetl plik

@ -3,7 +3,7 @@
* This programs dumps the mmeory contents of a rig. * 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 * 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; int status;
char freqbuf[20]; char freqbuf[20];
chan.vfo = RIG_VFO_MEM;
chan.channel_num = chan_num; chan.channel_num = chan_num;
status=rig_get_channel(rig, &chan); status=rig_get_channel(rig, &chan);

Wyświetl plik

@ -5,7 +5,7 @@
* It takes commands in interactive mode as well as * It takes commands in interactive mode as well as
* from command line options. * 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 * This program is free software; you can redistribute it and/or
@ -1252,8 +1252,17 @@ declare_proto_rig(get_channel)
{ {
int status; int status;
channel_t chan; 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); status = rig_get_channel(rig, &chan);
if (status != RIG_OK) if (status != RIG_OK)
return status; return status;