implemented scanning

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2319 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.7.1
Stéphane Fillod, F8CFE 2008-04-11 17:10:45 +00:00
rodzic 222d72e1ad
commit 56431cada6
7 zmienionych plików z 63 dodań i 15 usunięć

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib AOR backend - main file
* Copyright (c) 2000-2005 by Stephane Fillod
* Copyright (c) 2000-2008 by Stephane Fillod
*
* $Id: aor.c,v 1.42 2006-11-02 15:19:58 aa6e Exp $
* $Id: aor.c,v 1.43 2008-04-11 17:10:45 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -642,6 +642,36 @@ int aor_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
return aor_transaction (rig, aorcmd, strlen(aorcmd), NULL, NULL);
}
/*
* aor_scan, scan operation
* Assumes rig!=NULL, rig->state.priv!=NULL
*/
int aor_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
{
char *aorcmd;
switch (scan) {
case RIG_SCAN_STOP:
/* Not sure how to stop the scanning.
* Maye by going by to MEM/VFO mode?
* Any clue? */
if (vfo == RIG_VFO_CURR)
vfo = RIG_VFO_MEM; /* supported by all the AOR rigs */
return rig_set_vfo(rig, vfo);
case RIG_SCAN_MEM: aorcmd = "MS" EOM; break;
case RIG_SCAN_SLCT: aorcmd = "SM" EOM; break;
case RIG_SCAN_PROG: aorcmd = "VS" EOM; break; /* edges are VFO A & VFO B */
case RIG_SCAN_VFO: aorcmd = "VV1" EOM; break; /* VFO scan mode, VV0 for 2-VFO mode */
default:
rig_debug(RIG_DEBUG_ERR,"aor_scan: unsupported scan %d\n",
scan);
return -RIG_EINVAL;
}
return aor_transaction (rig, aorcmd, strlen(aorcmd), NULL, NULL);
}
/*
* aor_set_mem
* Assumes rig!=NULL

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib AOR backend - main header
* Copyright (c) 2000-2005 by Stephane Fillod
* Copyright (c) 2000-2008 by Stephane Fillod
*
* $Id: aor.h,v 1.23 2006-11-02 15:19:58 aa6e Exp $
* $Id: aor.h,v 1.24 2008-04-11 17:10:45 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -25,7 +25,7 @@
#include <hamlib/rig.h>
#define BACKEND_VER "0.4"
#define BACKEND_VER "0.5"
int format8k_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width);
@ -54,6 +54,7 @@ int aor_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd);
int aor_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts);
int aor_set_powerstat(RIG *rig, powerstat_t status);
int aor_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op);
int aor_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch);
const char *aor_get_info(RIG *rig);
int aor_set_mem(RIG *rig, vfo_t vfo, int ch);

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib AOR backend - AR2700 description
* Copyright (c) 2000-2005 by Stephane Fillod
* Copyright (c) 2000-2008 by Stephane Fillod
*
* $Id: ar2700.c,v 1.1 2005-04-20 14:48:49 fillods Exp $
* $Id: ar2700.c,v 1.2 2008-04-11 17:10:45 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -39,6 +39,7 @@
#define AR2700_PARM (RIG_PARM_APO)
#define AR2700_VFO_OPS (RIG_OP_MCL|RIG_OP_UP|RIG_OP_DOWN)
#define AR2700_SCAN_OPS (RIG_SCAN_MEM)
#define AR2700_VFO_ALL (RIG_VFO_A|RIG_VFO_MEM)
@ -121,6 +122,7 @@ const struct rig_caps ar2700_caps = {
.bank_qty = 10,
.chan_desc_sz = 0,
.vfo_ops = AR2700_VFO_OPS,
.scan_ops = AR2700_SCAN_OPS,
.str_cal = AR2700_STR_CAL,
.chan_list = {
@ -181,6 +183,7 @@ const struct rig_caps ar2700_caps = {
.set_ts = aor_set_ts,
.set_powerstat = aor_set_powerstat,
.vfo_op = aor_vfo_op,
.scan = aor_scan,
.get_info = aor_get_info,
.set_mem = aor_set_mem,

Wyświetl plik

@ -1,9 +1,9 @@
/*
* Hamlib AOR backend - AR5000 description
*
* Copyright (c) 2000-2004 by Stephane Fillod
* Copyright (c) 2000-2008 by Stephane Fillod
*
* $Id: ar5000.c,v 1.11 2006-11-02 15:19:58 aa6e Exp $
* $Id: ar5000.c,v 1.12 2008-04-11 17:10:45 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -41,6 +41,7 @@
#define AR5000_PARM (RIG_PARM_NONE)
#define AR5000_VFO_OPS (RIG_OP_MCL | RIG_OP_UP | RIG_OP_DOWN)
#define AR5000_SCAN_OPS (RIG_SCAN_MEM|RIG_SCAN_VFO|RIG_SCAN_PROG|RIG_SCAN_SLCT)
#define AR5000_VFO (RIG_VFO_A | RIG_VFO_B | RIG_VFO_C | RIG_VFO_N(3) | RIG_VFO_N(4))
@ -141,6 +142,7 @@ const struct rig_caps ar5000_caps = {
.bank_qty = 10,
.chan_desc_sz = 8,
.vfo_ops = AR5000_VFO_OPS,
.scan_ops = AR5000_SCAN_OPS,
.str_cal = AR5000_STR_CAL,
.chan_list = {
@ -220,6 +222,7 @@ const struct rig_caps ar5000_caps = {
.set_ts = aor_set_ts,
.set_powerstat = aor_set_powerstat,
.vfo_op = aor_vfo_op,
.scan = aor_scan,
.get_info = aor_get_info,
.set_mem = aor_set_mem,
@ -282,6 +285,7 @@ const struct rig_caps ar5000a_caps = {
.bank_qty = 10,
.chan_desc_sz = 8,
.vfo_ops = AR5000_VFO_OPS,
.scan_ops = AR5000_SCAN_OPS,
.str_cal = AR5000_STR_CAL,
.chan_list = {
@ -360,6 +364,7 @@ const struct rig_caps ar5000a_caps = {
.set_ts = aor_set_ts,
.set_powerstat = aor_set_powerstat,
.vfo_op = aor_vfo_op,
.scan = aor_scan,
.get_info = aor_get_info,
.set_mem = aor_set_mem,

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib AOR backend - AR8000 description
* Copyright (c) 2000-2004 by Stephane Fillod
* Copyright (c) 2000-2008 by Stephane Fillod
*
* $Id: ar8000.c,v 1.6 2005-04-20 14:50:56 fillods Exp $
* $Id: ar8000.c,v 1.7 2008-04-11 17:10:45 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -39,6 +39,7 @@
#define AR8000_PARM (RIG_PARM_APO|RIG_PARM_BACKLIGHT|RIG_PARM_BEEP)
#define AR8000_VFO_OPS (RIG_OP_MCL|RIG_OP_UP|RIG_OP_DOWN|RIG_OP_LEFT|RIG_OP_RIGHT)
#define AR8000_SCAN_OPS (RIG_SCAN_MEM|RIG_SCAN_VFO|RIG_SCAN_PROG|RIG_SCAN_SLCT)
#define AR8000_VFO (RIG_VFO_A|RIG_VFO_B)
@ -98,6 +99,7 @@ const struct rig_caps ar8000_caps = {
.bank_qty = 20,
.chan_desc_sz = 12,
.vfo_ops = AR8000_VFO_OPS,
.scan_ops = AR8000_SCAN_OPS,
.str_cal = AR8000_STR_CAL,
.chan_list = { RIG_CHAN_END, }, /* FIXME: memory channel list: 1000 memories */
@ -164,6 +166,7 @@ const struct rig_caps ar8000_caps = {
.set_ts = aor_set_ts,
.set_powerstat = aor_set_powerstat,
.vfo_op = aor_vfo_op,
.scan = aor_scan,
.get_info = aor_get_info,
.get_chan_all_cb = aor_get_chan_all_cb,

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib AOR backend - AR8200 description
* Copyright (c) 2000-2005 by Stephane Fillod
* Copyright (c) 2000-2008 by Stephane Fillod
*
* $Id: ar8200.c,v 1.21 2005-04-20 14:50:56 fillods Exp $
* $Id: ar8200.c,v 1.22 2008-04-11 17:10:45 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -39,6 +39,7 @@
#define AR8200_PARM (RIG_PARM_APO|RIG_PARM_BACKLIGHT|RIG_PARM_BEEP)
#define AR8200_VFO_OPS (RIG_OP_MCL|RIG_OP_UP|RIG_OP_DOWN|RIG_OP_LEFT|RIG_OP_RIGHT)
#define AR8200_SCAN_OPS (RIG_SCAN_MEM|RIG_SCAN_VFO|RIG_SCAN_PROG|RIG_SCAN_SLCT)
#define AR8200_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
@ -117,6 +118,7 @@ const struct rig_caps ar8200_caps = {
.bank_qty = 20, /* A through J, and a trough j */
.chan_desc_sz = 12,
.vfo_ops = AR8200_VFO_OPS,
.scan_ops = AR8200_SCAN_OPS,
.str_cal = AR8200_STR_CAL,
.chan_list = {
@ -184,6 +186,7 @@ const struct rig_caps ar8200_caps = {
.set_ts = aor_set_ts,
.set_powerstat = aor_set_powerstat,
.vfo_op = aor_vfo_op,
.scan = aor_scan,
.get_info = aor_get_info,
.set_mem = aor_set_mem,

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib AOR backend - AR8600 description
* Copyright (c) 2000-2005 by Stephane Fillod
* Copyright (c) 2000-2008 by Stephane Fillod
*
* $Id: ar8600.c,v 1.2 2007-09-18 19:31:56 fillods Exp $
* $Id: ar8600.c,v 1.3 2008-04-11 17:10:45 fillods Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -39,6 +39,7 @@
#define AR8600_PARM (RIG_PARM_APO|RIG_PARM_BACKLIGHT|RIG_PARM_BEEP)
#define AR8600_VFO_OPS (RIG_OP_MCL|RIG_OP_UP|RIG_OP_DOWN|RIG_OP_LEFT|RIG_OP_RIGHT)
#define AR8600_SCAN_OPS (RIG_SCAN_MEM|RIG_SCAN_VFO|RIG_SCAN_PROG|RIG_SCAN_SLCT)
#define AR8600_VFO_ALL (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
@ -117,6 +118,7 @@ const struct rig_caps ar8600_caps = {
.bank_qty = 20, /* A through J, and a trough j */
.chan_desc_sz = 12,
.vfo_ops = AR8600_VFO_OPS,
.scan_ops = AR8600_SCAN_OPS,
.str_cal = AR8600_STR_CAL,
.chan_list = {
@ -183,6 +185,7 @@ const struct rig_caps ar8600_caps = {
.set_ts = aor_set_ts,
.set_powerstat = aor_set_powerstat,
.vfo_op = aor_vfo_op,
.scan = aor_scan,
.get_info = aor_get_info,
.set_mem = aor_set_mem,