kopia lustrzana https://github.com/Hamlib/Hamlib
added Pegasus and tentec_trx_open
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@843 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.3
rodzic
690a6539a5
commit
cb70a847e4
|
@ -1,4 +1,4 @@
|
|||
TENTECSRCLIST = rx320.c
|
||||
TENTECSRCLIST = rx320.c pegasus.c
|
||||
|
||||
lib_LTLIBRARIES = libhamlib-tentec.la
|
||||
libhamlib_tentec_la_SOURCES = $(TENTECSRCLIST) tentec.c
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Tentec backend - main file
|
||||
* Copyright (c) 2001,2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: tentec.c,v 1.3 2001-12-28 20:28:03 fillods Exp $
|
||||
* $Id: tentec.c,v 1.4 2002-01-06 17:49:55 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
|
||||
|
@ -72,6 +72,8 @@ int tentec_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *
|
|||
|
||||
rs = &rig->state;
|
||||
|
||||
serial_flush(&rs->rigport);
|
||||
|
||||
retval = write_block(&rs->rigport, cmd, cmd_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
@ -82,6 +84,9 @@ int tentec_transaction(RIG *rig, const char *cmd, int cmd_len, char *data, int *
|
|||
/*
|
||||
* buffered read are quite helpful here!
|
||||
* However, an automate with a state model would be more efficient..
|
||||
*
|
||||
* FIXME:
|
||||
* and BTW, this is currently helpless since length of response may vary
|
||||
*/
|
||||
i = 0;
|
||||
do {
|
||||
|
@ -148,6 +153,27 @@ int tentec_cleanup(RIG *rig)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Tentec transceiver only open routine
|
||||
* Restart and set program to execute.
|
||||
*/
|
||||
int tentec_trx_open(RIG *rig)
|
||||
{
|
||||
struct rig_state *rs = &rig->state;
|
||||
int ack_len, retval;
|
||||
char ack[16];
|
||||
|
||||
/*
|
||||
* be kind: use XX first, and do 'Dsp Program Execute' only
|
||||
* in " DSP START" state.
|
||||
*/
|
||||
retval = tentec_transaction (rig, "P1" EOM, 3, NULL, NULL);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Tuning Factor Calculations
|
||||
|
@ -437,6 +463,7 @@ int initrigs_tentec(void *be_handle)
|
|||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "tentec: _init called\n");
|
||||
|
||||
rig_register(&tt550_caps);
|
||||
rig_register(&rx320_caps);
|
||||
|
||||
return RIG_OK;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Tentec backend - main header
|
||||
* Copyright (c) 2001,2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: tentec.h,v 1.3 2001-12-28 20:28:04 fillods Exp $
|
||||
* $Id: tentec.h,v 1.4 2002-01-06 17:49:55 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,6 +50,7 @@ struct tentec_priv_data {
|
|||
|
||||
int tentec_init(RIG *rig);
|
||||
int tentec_cleanup(RIG *rig);
|
||||
int tentec_trx_open(RIG *rig);
|
||||
int tentec_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
|
||||
int tentec_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
||||
int tentec_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
|
@ -59,6 +60,7 @@ int tentec_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val);
|
|||
const char* tentec_get_info(RIG *rig);
|
||||
|
||||
extern const struct rig_caps rx320_caps;
|
||||
extern const struct rig_caps tt550_caps;
|
||||
|
||||
extern BACKEND_EXPORT(int) initrigs_tentec(void *be_handle);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue