moved miniVNA to kit subdir

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2321 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.7.1
Stéphane Fillod, F8CFE 2008-04-11 18:03:53 +00:00
rodzic 9bc4ef3c43
commit 20e2fbf8ec
6 zmienionych plików z 99 dodań i 18 usunięć

Wyświetl plik

@ -17,8 +17,7 @@ SUBDIRS = macros include lib libltdl src @BACKEND_LIST@ @ROT_BACKEND_LIST@ \
DIST_SUBDIRS = macros include lib libltdl src c++ bindings tests doc \
icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc \
rpcrig winradio easycomm fodtrack rpcrot gnuradio drake rotorez \
microtune flexradio sartek lowe rft tapr kit skanti wj racal tuner \
miniVNA
microtune flexradio sartek lowe rft tapr kit skanti wj racal tuner
rpm: Makefile
make dist

Wyświetl plik

@ -222,7 +222,7 @@ fi
AC_SUBST(RIGMATRIX)
BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc drake lowe rft kit skanti tapr flexradio wj racal tuner miniVNA"
BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc drake lowe rft kit skanti tapr flexradio wj racal tuner"
ROT_BACKEND_LIST="dummy easycomm rotorez sartek fodtrack"
BINDINGS=""
BINDING_ALL=""
@ -501,7 +501,6 @@ gnuradio/Makefile
easycomm/Makefile
fodtrack/Makefile
sartek/Makefile
miniVNA/Makefile
rpcrig/Makefile
rpcrot/Makefile
src/Makefile

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Interface - list of known rigs
* Copyright (c) 2000-2008 by Stephane Fillod and Frank Singleton
*
* $Id: riglist.h,v 1.66 2008-04-11 12:59:31 fillods Exp $
* $Id: riglist.h,v 1.67 2008-04-11 18:03:53 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
@ -435,6 +435,7 @@
#define RIG_MODEL_USRP RIG_MAKE_MODEL(RIG_KIT, 5)
#define RIG_MODEL_DDS60 RIG_MAKE_MODEL(RIG_KIT, 6)
#define RIG_MODEL_ELEKTOR507 RIG_MAKE_MODEL(RIG_KIT, 7) /* Elektor SDR USB */
#define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_KIT, 8)
/*
* SW/FM/TV tuner cards supported by Video4Linux,*BSD, ..
@ -443,14 +444,6 @@
#define RIG_BACKEND_TUNER "tuner"
#define RIG_MODEL_V4L RIG_MAKE_MODEL(RIG_TUNER, 1)
/*
* miniVNA used as external VFO
*/
#define RIG_MINIVNA 27
#define RIG_BACKEND_MINIVNA "miniVNA"
#define RIG_MODEL_MINIVNA RIG_MAKE_MODEL(RIG_MINIVNA, 1)
/*
* TODO:
RIG_MODEL_KWZ30, KNEISNER +DOERING
@ -496,7 +489,6 @@ typedef int rig_model_t;
{ RIG_RFT, RIG_BACKEND_RFT }, \
{ RIG_KIT, RIG_BACKEND_KIT }, \
{ RIG_TUNER, RIG_BACKEND_TUNER }, \
{ RIG_MINIVNA, RIG_BACKEND_MINIVNA }, \
{ 0, NULL }, /* end */ \
}

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib KIT backend - main file
* Copyright (c) 2004-2005 by Stephane Fillod
* Copyright (c) 2004-2008 by Stephane Fillod
*
* $Id: kit.c,v 1.6 2007-10-23 21:56:30 fillods Exp $
* $Id: kit.c,v 1.7 2008-04-11 18:03:53 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
@ -44,6 +44,7 @@ DECLARE_INITRIG_BACKEND(kit)
rig_register(&elektor304_caps);
rig_register(&drt1_caps);
rig_register(&dds60_caps);
rig_register(&miniVNA_caps);
#if (defined(HAVE_LIBUSB) && defined(HAVE_USB_H)) || defined(_WIN32)
rig_register(&dwt_caps);

Wyświetl plik

@ -1,8 +1,8 @@
/*
* Hamlib KIT backend - main header
* Copyright (c) 2004-2005 by Stephane Fillod
* Copyright (c) 2004-2008 by Stephane Fillod
*
* $Id: kit.h,v 1.5 2007-10-23 21:56:30 fillods Exp $
* $Id: kit.h,v 1.6 2008-04-11 18:03:53 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
@ -32,5 +32,6 @@ extern const struct rig_caps dwt_caps;
extern const struct rig_caps usrp0_caps;
extern const struct rig_caps usrp_caps;
extern const struct rig_caps dds60_caps;
extern const struct rig_caps miniVNA_caps;
#endif /* _KIT_H */

89
kit/miniVNA.c 100644
Wyświetl plik

@ -0,0 +1,89 @@
/*
* Hamlib miniVNA backend - main file
* Copyright (c) 2001-2008 by Stephane Fillod
*
* $Id: miniVNA.c,v 1.1 2008-04-11 18:03:53 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
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <math.h>
#include "hamlib/rig.h"
#include "serial.h"
#include "misc.h"
#define DDS_RATIO 10.73741824
static int miniVNA_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
char fstr[20];
char cmdstr[40];
int retval;
sprintf_freq(fstr, freq);
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n", __FUNCTION__,
rig_strvfo(vfo), fstr);
serial_flush(&rig->state.rigport);
sprintf(cmdstr,"0\r%lu\r1\r0\r",(unsigned long int)(freq*DDS_RATIO));
retval = write_block(&rig->state.rigport, cmdstr, strlen(cmdstr));
if (retval != RIG_OK)
return retval;
return RIG_OK;
}
const struct rig_caps miniVNA_caps = {
.rig_model = RIG_MODEL_MINIVNA,
.model_name = "miniVNA",
.mfg_name = "mRS",
.version = "0.1",
.copyright = "LGPL",
.status = RIG_STATUS_ALPHA,
.rig_type = RIG_TYPE_TUNER,
.port_type = RIG_PORT_SERIAL,
.serial_rate_min = 115200,
.serial_rate_max = 115200,
.serial_data_bits = 8,
.serial_stop_bits = 1,
.serial_parity = RIG_PARITY_NONE,
.serial_handshake = RIG_HANDSHAKE_NONE,
.write_delay = 0,
.post_write_delay = 1,
.timeout = 1000,
.retry = 3,
.rx_range_list1 = { {.start=kHz(100),.end=MHz(180),.modes=RIG_MODE_NONE, .low_power=-1,.high_power=-1,RIG_VFO_A},
RIG_FRNG_END, },
.tx_range_list1 = { {.start=kHz(100),.end=MHz(180),.modes=RIG_MODE_NONE, .low_power=-1,.high_power=-1,RIG_VFO_A},
RIG_FRNG_END, },
.tuning_steps = { {RIG_MODE_NONE,1}, RIG_TS_END, },
.set_freq = miniVNA_set_freq,
};