pull/1432/head
Mike Black W9MDB 2023-11-16 16:33:32 -06:00
rodzic 41a1da795c
commit 85f828b19f
3 zmienionych plików z 43 dodań i 4 usunięć

Wyświetl plik

@ -7462,7 +7462,8 @@ int icom_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
case RIG_FUNC_DUAL_WATCH:
if ((RIG_IS_IC9100) ||
(RIG_IS_IC9700))
(RIG_IS_IC9700) ||
(RIG_IS_ID5100))
{
fct_cn = C_CTL_FUNC;
fct_sc = S_MEM_DUALMODE;

Wyświetl plik

@ -154,7 +154,7 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
if (vfo == RIG_VFO_A || vfo == RIG_VFO_B)
{
// and 0x25 works in this mode
priv->x25cmdfails = 0;
priv->x25cmdfails = 1;
if (priv->dual_watch)
{
@ -222,6 +222,24 @@ int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
return retval;
}
int id5100_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
{
unsigned char ackbuf[MAXFRAMELEN];
int ack_len = sizeof(ackbuf), retval;
int fct_cn, fct_sc; /* Command Number, Subcommand */
unsigned char fctbuf[MAXFRAMELEN];
int fct_len = 0;
const struct icom_priv_caps *priv_caps = rig->caps->priv;
const struct cmdparams *extcmds = priv_caps->extcmds;
int i;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
ENTERFUNC;
value_t value;
RETURNFUNC(icom_get_func(rig, vfo, func, status));
}
/*
*/
static struct icom_priv_caps id5100_priv_caps =
@ -237,7 +255,7 @@ const struct rig_caps id5100_caps =
RIG_MODEL(RIG_MODEL_ID5100),
.model_name = "ID-5100",
.mfg_name = "Icom",
.version = BACKEND_VER ".6",
.version = BACKEND_VER ".7",
.copyright = "LGPL",
.status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_MOBILE,
@ -344,7 +362,7 @@ const struct rig_caps id5100_caps =
.decode_event = icom_decode_event,
.set_func = icom_set_func,
.get_func = icom_get_func,
.get_func = id5100_get_func,
.set_level = icom_set_level,
.get_level = icom_get_level,
.set_parm = icom_set_parm,

20
simulators/sim.h 100644
Wyświetl plik

@ -0,0 +1,20 @@
#include "../src/misc.h"
#include <errno.h>
#define WRITE(f,b,l) write_sim(f,(const unsigned char*)b,l,__func__,__LINE__)
int write_sim(int fd, const unsigned char *buf, int buflen, const char *func,
int linenum)
{
int n;
dump_hex(buf, buflen);
n = write(fd, buf, buflen);
if (n <= 0)
{
fprintf(stderr, "%s(%d) buf='%s' write error %d: %s\n", func, linenum, buf, n,
strerror(errno));
}
return n;
}