converted RIG_SCAN_RESUME_ON/OFF to more appropriate RIG_FUNC_RESUME

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1039 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.3
Stéphane Fillod, F8CFE 2002-04-23 21:49:04 +00:00
rodzic dfb2bf09e3
commit a8f2f620cf
3 zmienionych plików z 15 dodań i 19 usunięć

Wyświetl plik

@ -3,7 +3,7 @@
* Contributed by Francois Retief <fgretief@sun.ac.za>
* Copyright (c) 2000,2001 by Stephane Fillod
*
* $Id: ic910.c,v 1.1 2002-02-28 10:59:46 fgretief Exp $
* $Id: ic910.c,v 1.2 2002-04-23 21:49:04 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
@ -118,7 +118,7 @@ post_write_delay: 0,
timeout: 200,
retry: 3,
has_get_func: IC910_FUNC_ALL,
has_set_func: IC910_FUNC_ALL,
has_set_func: IC910_FUNC_ALL | RIG_FUNC_RESUME,
has_get_level: IC910_LEVEL_ALL | (RIG_LEVEL_SQLSTAT|RIG_LEVEL_STRENGTH),
has_set_level: IC910_LEVEL_ALL,
has_get_parm: RIG_PARM_NONE,
@ -201,8 +201,6 @@ get_vfo: NULL,
set_vfo: icom_set_vfo,
get_ts: icom_get_ts,
set_ts: icom_set_ts,
get_channel: icom_get_channel,
set_channel: icom_set_channel,
get_func: icom_get_func,
set_func: icom_set_func,
get_level: icom_get_level,

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib CI-V backend - main file
* Copyright (c) 2000-2002 by Stephane Fillod
*
* $Id: icom.c,v 1.59 2002-03-18 23:04:27 fillods Exp $
* $Id: icom.c,v 1.60 2002-04-23 21:49:04 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
@ -1571,6 +1571,11 @@ int icom_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
fct_cn = C_CTL_MEM;
fct_sc = S_MEM_BANDSCOPE;
break;
case RIG_FUNC_RESUME: /* IC-910H */
fct_cn = C_CTL_SCAN;
fct_sc = status ? S_SCAN_RSMON : S_SCAN_RSMOFF;
fct_len = 0;
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported set_func %d", func);
return -RIG_EINVAL;
@ -1873,11 +1878,11 @@ int icom_get_ctcss_sql(RIG *rig, vfo_t vfo, unsigned int *tone)
}
/*
* icom_set_channel
* icr75_set_channel
* Assumes rig!=NULL, rig->state.priv!=NULL, chan!=NULL
* TODO: still a WIP --SF
*/
int icom_set_channel(RIG *rig, const channel_t *chan)
int icr75_set_channel(RIG *rig, const channel_t *chan)
{
struct icom_priv_data *priv;
struct rig_state *rs;
@ -1934,11 +1939,11 @@ int icom_set_channel(RIG *rig, const channel_t *chan)
}
/*
* icom_get_channel
* icr75_get_channel
* Assumes rig!=NULL, rig->state.priv!=NULL, chan!=NULL
* TODO: still a WIP --SF
*/
int icom_get_channel(RIG *rig, channel_t *chan)
int icr75_get_channel(RIG *rig, channel_t *chan)
{
struct icom_priv_data *priv;
struct rig_state *rs;
@ -1964,7 +1969,7 @@ int icom_get_channel(RIG *rig, channel_t *chan)
*/
chan_len--;
if (freq_len != freq_len+16) {
rig_debug(RIG_DEBUG_ERR,"icom_get_channel: wrong frame len=%d\n",
rig_debug(RIG_DEBUG_ERR,"icr75_get_channel: wrong frame len=%d\n",
chan_len);
return -RIG_ERJCTED;
}
@ -2232,12 +2237,6 @@ int icom_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
case RIG_SCAN_DELTA:
scan_sc = S_SCAN_DELTA; /* TODO: delta-f support */
break;
case RIG_SCAN_RESUME_ON:
scan_sc = S_SCAN_RSMON;
break;
case RIG_SCAN_RESUME_OFF:
scan_sc = S_SCAN_RSMOFF;
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported scan %#x", scan);
return -RIG_EINVAL;

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - API header
* Copyright (c) 2000-2002 by Stephane Fillod and Frank Singleton
*
* $Id: rig.h,v 1.63 2002-03-18 22:59:30 fillods Exp $
* $Id: rig.h,v 1.64 2002-04-23 21:49:04 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
@ -361,8 +361,6 @@ typedef long vfo_op_t;
#define RIG_SCAN_PRIO (1L<<2) /* Priority watch (mem or call channel) */
#define RIG_SCAN_PROG (1L<<3) /* Programmed(edge) scan */
#define RIG_SCAN_DELTA (1L<<4) /* delta-f scan */
#define RIG_SCAN_RESUME_ON (1L<<5) /* Scan resume ON (IC-910H) */
#define RIG_SCAN_RESUME_OFF (1L<<6) /* Scan resume OFF (IC-910H) */
typedef long scan_t;
@ -545,6 +543,7 @@ typedef unsigned long long setting_t; /* hope 64 bits will be enough.. */
#define RIG_FUNC_AFC (1<<25) /* Auto Frequency Control ON/OFF */
#define RIG_FUNC_SATMODE (1<<26) /* Satellite mode ON/OFF (IC-910H) */
#define RIG_FUNC_SCOPE (1<<27) /* Simple bandscope ON/OFF (IC-910H) */
#define RIG_FUNC_RESUME (1<<28) /* Scan resume */
/*
* power unit macros, converts to mW