[Hamlib-cvs-digest] CVS: hamlib/tests rigctl.c,1.2,1.3
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Stephane F. <f4...@us...> - 2000-12-04 23:39:21
|
Update of /cvsroot/hamlib/hamlib/tests In directory slayer.i.sourceforge.net:/tmp/cvs-serv6495/tests Modified Files: rigctl.c Log Message: * removed [sg]et_passband in favor of an enhanced [sg]et_mode which includes the passband, since most rigs tie these parameters together quite often. For exemple, WFM is (RIG_MODE_FM,RIG_PASSBAND_WIDE) in Hamlib. Another set of functions will be needed to fine tune aditional frequency response/filters. Index: rigctl.c =================================================================== RCS file: /cvsroot/hamlib/hamlib/tests/rigctl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** rigctl.c 2000/11/28 22:34:37 1.2 --- rigctl.c 2000/12/04 23:39:18 1.3 *************** *** 47,52 **** static int set_mode(RIG *rig); static int get_mode(RIG *rig); - static int set_passband(RIG *rig); - static int get_passband(RIG *rig); static int set_vfo(RIG *rig); static int get_vfo(RIG *rig); --- 47,50 ---- *************** *** 86,91 **** { 'M', "rig_set_mode", set_mode }, { 'm', "rig_get_mode", get_mode }, - { 'P', "rig_set_passband", set_passband }, - { 'p', "rig_get_passband", get_passband }, { 'V', "rig_set_vfo", set_vfo }, { 'v', "rig_get_vfo", get_vfo }, --- 84,87 ---- *************** *** 226,264 **** { rmode_t mode; printf("Mode: "); scanf("%d", &mode); - return rig_set_mode(rig, mode); - } - - - static int get_mode(RIG *rig) - { - int status; - rmode_t mode; - - status = rig_get_mode(rig, &mode); - printf("Mode: %d\n", mode); - return status; - } - - - static int set_passband(RIG *rig) - { - pbwidth_t width; - printf("Passband: "); scanf("%d", (int*)&width); ! return rig_set_passband(rig, width); } ! static int get_passband(RIG *rig) { int status; pbwidth_t width; ! status = rig_get_passband(rig, &width); ! printf("Passband: %d\n", width); return status; } --- 222,243 ---- { rmode_t mode; + pbwidth_t width; printf("Mode: "); scanf("%d", &mode); printf("Passband: "); scanf("%d", (int*)&width); ! return rig_set_mode(rig, mode, width); } ! static int get_mode(RIG *rig) { int status; + rmode_t mode; pbwidth_t width; ! status = rig_get_mode(rig, &mode, &width); ! printf("Mode: %d\nPassband: %d\n", mode, width); return status; } |