kopia lustrzana https://github.com/Hamlib/Hamlib
Add Barrett 4100
rodzic
34f953ba0b
commit
f8fd79442d
1
NEWS
1
NEWS
|
@ -13,6 +13,7 @@ Version 5.x -- future
|
|||
* Change FT1000MP Mark V model names to align with FT1000MP
|
||||
|
||||
Version 4.6
|
||||
* Added Barrett 4100
|
||||
* Added DL2MAN (tr)uSDX -- needs refinement
|
||||
* Added Thetis entry -- derived from FlexRadio/Apache PowerSDR
|
||||
* Added VOICE/CW memory capability to many rigs -- thanks to David Balharrie M0DGB/G8FKH
|
||||
|
|
|
@ -625,6 +625,7 @@
|
|||
#define RIG_MODEL_BARRETT_2050 RIG_MAKE_MODEL(RIG_BARRETT, 1)
|
||||
#define RIG_MODEL_BARRETT_950 RIG_MAKE_MODEL(RIG_BARRETT, 2)
|
||||
#define RIG_MODEL_BARRETT_4050 RIG_MAKE_MODEL(RIG_BARRETT, 3)
|
||||
#define RIG_MODEL_BARRETT_4100 RIG_MAKE_MODEL(RIG_BARRETT, 4)
|
||||
|
||||
/*
|
||||
* Elad
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
BARRETTSRC = barrett.c barrett.h 950.c 4050.c
|
||||
BARRETTSRC = barrett.c barrett.h 950.c 4050.c 4100.c
|
||||
|
||||
noinst_LTLIBRARIES = libhamlib-barrett.la
|
||||
libhamlib_barrett_la_SOURCES = $(BARRETTSRC)
|
||||
|
|
|
@ -47,12 +47,32 @@ DECLARE_INITRIG_BACKEND(barrett)
|
|||
rig_register(&barrett_caps);
|
||||
rig_register(&barrett950_caps);
|
||||
rig_register(&barrett4050_caps);
|
||||
rig_register(&barrett4100_caps);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init back from rig_register\n", __func__);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
// this version is for 4100
|
||||
int barrett_transaction2(RIG *rig, char *cmd, int expected, char **result)
|
||||
{
|
||||
char cmd_buf[MAXCMDLEN];
|
||||
struct rig_state *rs = &rig->state;
|
||||
struct barrett_priv_data *priv = rig->state.priv;
|
||||
int retval;
|
||||
|
||||
SNPRINTF(cmd_buf, sizeof(cmd_buf), "%c%s%s", 0x0a, cmd, EOM);
|
||||
retval = read_block(&rs->rigport, (unsigned char *) priv->ret_data, expected);
|
||||
|
||||
if (retval < 0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s(%d): error in read_block\n", __func__, __LINE__);
|
||||
return retval;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
|
||||
{
|
||||
char cmd_buf[MAXCMDLEN];
|
||||
|
@ -65,7 +85,13 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
|
|||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __func__, cmd);
|
||||
|
||||
SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%s", cmd, EOM);
|
||||
if (rig->caps->rig_model == RIG_MODEL_BARRETT_4100)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
SNPRINTF(cmd_buf, sizeof(cmd_buf), "%s%s", cmd, EOM);
|
||||
}
|
||||
|
||||
rig_flush(&rs->rigport);
|
||||
retval = write_block(&rs->rigport, (unsigned char *) cmd_buf, strlen(cmd_buf));
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
extern struct rig_caps barrett_caps;
|
||||
extern struct rig_caps barrett950_caps;
|
||||
extern struct rig_caps barrett4050_caps;
|
||||
extern struct rig_caps barrett4100_caps;
|
||||
|
||||
struct barrett_priv_data {
|
||||
char cmd_str[BARRETT_DATA_LEN]; /* command string buffer */
|
||||
|
@ -48,6 +49,7 @@ struct barrett_priv_data {
|
|||
};
|
||||
|
||||
extern int barrett_transaction(RIG *rig, char *cmd, int expected, char **result);
|
||||
extern int barrett_transaction2(RIG *rig, char *cmd, int expected, char **result);
|
||||
|
||||
extern int barrett_init(RIG *rig);
|
||||
extern int barrett_cleanup(RIG *rig);
|
||||
|
|
Ładowanie…
Reference in New Issue