kopia lustrzana https://github.com/Hamlib/Hamlib
removed useless vfo arg to set_trn/get_trn funcs
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@780 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.3
rodzic
a7baa6ee7b
commit
170644f6e5
|
@ -11,7 +11,7 @@
|
|||
* Hamlib C++ bindings - main file
|
||||
* Copyright (c) 2001 by Stephane Fillod
|
||||
*
|
||||
* $Id: rigclass.cc,v 1.5 2001-12-16 11:18:40 fillods Exp $
|
||||
* $Id: rigclass.cc,v 1.6 2001-12-20 07:46:12 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
|
||||
|
@ -369,16 +369,16 @@ float Rig::mW2power (unsigned int mwpower, freq_t freq, rmode_t mode)
|
|||
return power;
|
||||
}
|
||||
|
||||
void Rig::setTrn (int trn, vfo_t vfo = RIG_VFO_CURR)
|
||||
void Rig::setTrn (int trn)
|
||||
{
|
||||
CHECK_RIG( rig_set_trn(theRig, vfo, trn) );
|
||||
CHECK_RIG( rig_set_trn(theRig, trn) );
|
||||
}
|
||||
|
||||
int Rig::getTrn (vfo_t vfo = RIG_VFO_CURR)
|
||||
int Rig::getTrn ()
|
||||
{
|
||||
int trn;
|
||||
|
||||
CHECK_RIG( rig_get_trn(theRig, vfo, &trn) );
|
||||
CHECK_RIG( rig_get_trn(theRig, &trn) );
|
||||
|
||||
return trn;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Dummy backend - main file
|
||||
* Copyright (c) 2001 by Stephane Fillod
|
||||
*
|
||||
* $Id: dummy.c,v 1.18 2001-12-16 11:24:56 fillods Exp $
|
||||
* $Id: dummy.c,v 1.19 2001-12-20 07:46:12 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
|
||||
|
@ -511,7 +511,7 @@ static int dummy_get_channel(RIG *rig, channel_t *chan)
|
|||
}
|
||||
|
||||
|
||||
static int dummy_set_trn(RIG *rig, vfo_t vfo, int trn)
|
||||
static int dummy_set_trn(RIG *rig, int trn)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
|
||||
|
||||
|
@ -519,7 +519,7 @@ static int dummy_set_trn(RIG *rig, vfo_t vfo, int trn)
|
|||
}
|
||||
|
||||
|
||||
static int dummy_get_trn(RIG *rig, vfo_t vfo, int *trn)
|
||||
static int dummy_get_trn(RIG *rig, int *trn)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib C++ bindings - API header
|
||||
* Copyright (c) 2001 by Stephane Fillod
|
||||
*
|
||||
* $Id: rigclass.h,v 1.6 2001-12-16 11:18:40 fillods Exp $
|
||||
* $Id: rigclass.h,v 1.7 2001-12-20 07:46:12 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
|
||||
|
@ -81,8 +81,8 @@ public:
|
|||
|
||||
unsigned int power2mW (float power, freq_t freq, rmode_t mode);
|
||||
float mW2power (unsigned int mwpower, freq_t freq, rmode_t mode);
|
||||
void setTrn (int trn, vfo_t vfo = RIG_VFO_CURR);
|
||||
int getTrn (vfo_t vfo = RIG_VFO_CURR);
|
||||
void setTrn (int trn);
|
||||
int getTrn (void);
|
||||
void setBank (int bank, vfo_t vfo = RIG_VFO_CURR);
|
||||
void setMem (int ch, vfo_t vfo = RIG_VFO_CURR);
|
||||
int getMem (vfo_t vfo = RIG_VFO_CURR);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - main file
|
||||
* Copyright (c) 2000,2001 by Stephane Fillod
|
||||
*
|
||||
* $Id: kenwood.c,v 1.20 2001-12-16 11:14:46 fillods Exp $
|
||||
* $Id: kenwood.c,v 1.21 2001-12-20 07:46:12 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
|
||||
|
@ -733,7 +733,7 @@ int kenwood_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
|
|||
* kenwood_set_trn
|
||||
* Assumes rig!=NULL
|
||||
*/
|
||||
int kenwood_set_trn(RIG *rig, vfo_t vfo, int trn)
|
||||
int kenwood_set_trn(RIG *rig, int trn)
|
||||
{
|
||||
unsigned char trnbuf[16], ackbuf[16];
|
||||
int trn_len, ack_len = 0;
|
||||
|
@ -747,7 +747,7 @@ int kenwood_set_trn(RIG *rig, vfo_t vfo, int trn)
|
|||
* kenwood_get_trn
|
||||
* Assumes rig!=NULL, trn!=NULL
|
||||
*/
|
||||
int kenwood_get_trn(RIG *rig, vfo_t vfo, int *trn)
|
||||
int kenwood_get_trn(RIG *rig, int *trn)
|
||||
{
|
||||
unsigned char trnbuf[16];
|
||||
int trn_len, retval;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - main header
|
||||
* Copyright (c) 2000,2001 by Stephane Fillod
|
||||
*
|
||||
* $Id: kenwood.h,v 1.13 2001-12-16 11:14:46 fillods Exp $
|
||||
* $Id: kenwood.h,v 1.14 2001-12-20 07:46:12 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
|
||||
|
@ -50,8 +50,8 @@ int kenwood_set_mem(RIG *rig, vfo_t vfo, int ch);
|
|||
int kenwood_get_mem(RIG *rig, vfo_t vfo, int *ch);
|
||||
const char* kenwood_get_info(RIG *rig);
|
||||
|
||||
int kenwood_set_trn(RIG *rig, vfo_t vfo, int trn);
|
||||
int kenwood_get_trn(RIG *rig, vfo_t vfo, int *trn);
|
||||
int kenwood_set_trn(RIG *rig, int trn);
|
||||
int kenwood_get_trn(RIG *rig, int *trn);
|
||||
|
||||
extern const struct rig_caps ts450s_caps;
|
||||
extern const struct rig_caps ts570d_caps;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib RPC backend - main file
|
||||
* Copyright (c) 2001 by Stephane Fillod
|
||||
*
|
||||
* $Id: rpcrig_backend.c,v 1.2 2001-12-16 11:14:46 fillods Exp $
|
||||
* $Id: rpcrig_backend.c,v 1.3 2001-12-20 07:46:12 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
|
||||
|
@ -597,7 +597,7 @@ static int rpcrig_get_channel(RIG *rig, channel_t *chan)
|
|||
}
|
||||
|
||||
|
||||
static int rpcrig_set_trn(RIG *rig, vfo_t vfo, int trn)
|
||||
static int rpcrig_set_trn(RIG *rig, int trn)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
|
||||
|
||||
|
@ -605,7 +605,7 @@ static int rpcrig_set_trn(RIG *rig, vfo_t vfo, int trn)
|
|||
}
|
||||
|
||||
|
||||
static int rpcrig_get_trn(RIG *rig, vfo_t vfo, int *trn)
|
||||
static int rpcrig_get_trn(RIG *rig, int *trn)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE,__FUNCTION__ " called\n");
|
||||
|
||||
|
|
12
src/rig.c
12
src/rig.c
|
@ -12,7 +12,7 @@
|
|||
* Hamlib Interface - main file
|
||||
* Copyright (c) 2000,2001 by Stephane Fillod and Frank Singleton
|
||||
*
|
||||
* $Id: rig.c,v 1.49 2001-12-19 03:35:27 fillods Exp $
|
||||
* $Id: rig.c,v 1.50 2001-12-20 07:46:12 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
|
||||
|
@ -3698,7 +3698,7 @@ rig_get_range(const freq_range_t range_list[], freq_t freq, rmode_t mode)
|
|||
* \sa rig_get_trn()
|
||||
*/
|
||||
|
||||
int rig_set_trn(RIG *rig, vfo_t vfo, int trn)
|
||||
int rig_set_trn(RIG *rig, int trn)
|
||||
{
|
||||
const struct rig_caps *caps;
|
||||
int status;
|
||||
|
@ -3718,7 +3718,7 @@ int rig_set_trn(RIG *rig, vfo_t vfo, int trn)
|
|||
*/
|
||||
status = add_trn_rig(rig);
|
||||
if (caps->set_trn)
|
||||
return caps->set_trn(rig, vfo, RIG_TRN_RIG);
|
||||
return caps->set_trn(rig, RIG_TRN_RIG);
|
||||
else
|
||||
return status;
|
||||
} else {
|
||||
|
@ -3727,7 +3727,7 @@ int rig_set_trn(RIG *rig, vfo_t vfo, int trn)
|
|||
} else {
|
||||
status = remove_trn_rig(rig);
|
||||
if (caps->set_trn)
|
||||
return caps->set_trn(rig, vfo, RIG_TRN_OFF);
|
||||
return caps->set_trn(rig, RIG_TRN_OFF);
|
||||
else
|
||||
return status;
|
||||
}
|
||||
|
@ -3750,7 +3750,7 @@ int rig_set_trn(RIG *rig, vfo_t vfo, int trn)
|
|||
*
|
||||
* \sa rig_set_trn()
|
||||
*/
|
||||
int rig_get_trn(RIG *rig, vfo_t vfo, int *trn)
|
||||
int rig_get_trn(RIG *rig, int *trn)
|
||||
{
|
||||
if (!rig || !rig->caps || !trn)
|
||||
return -RIG_EINVAL;
|
||||
|
@ -3758,7 +3758,7 @@ int rig_get_trn(RIG *rig, vfo_t vfo, int *trn)
|
|||
if (rig->caps->get_trn == NULL)
|
||||
return -RIG_ENAVAIL;
|
||||
|
||||
return rig->caps->get_trn(rig, vfo, trn);
|
||||
return rig->caps->get_trn(rig, trn);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -63,7 +63,7 @@ int main (int argc, char *argv[])
|
|||
|
||||
my_rig->callbacks.freq_event = myfreq_event;
|
||||
|
||||
retcode = rig_set_trn(my_rig, RIG_VFO_CURR, RIG_TRN_RIG);
|
||||
retcode = rig_set_trn(my_rig, RIG_TRN_RIG);
|
||||
|
||||
if (retcode != RIG_OK ) {
|
||||
printf("rig_set_trn: error = %s \n", rigerror(retcode));
|
||||
|
|
Ładowanie…
Reference in New Issue