kopia lustrzana https://github.com/Hamlib/Hamlib
Porównaj commity
6 Commity
bddd7e1a7d
...
95b0af114f
Autor | SHA1 | Data |
---|---|---|
Mike Black W9MDB | 95b0af114f | |
Mike Black W9MDB | 9e42ca2052 | |
Mike Black W9MDB | 331143fa17 | |
Mike Black W9MDB | a6ad5f0928 | |
Mike Black W9MDB | b42aa75dd8 | |
Mike Black W9MDB | 6cfdb9d4ed |
|
@ -2223,6 +2223,9 @@ static int icom_set_mode_without_data(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
|| RIG_IS_IC375
|
||||
|| RIG_IS_IC726
|
||||
|| RIG_IS_IC475
|
||||
|| RIG_IS_IC756
|
||||
|| RIG_IS_IC756PROII
|
||||
|| RIG_IS_IC756PROIII
|
||||
|| RIG_IS_IC910
|
||||
|| RIG_IS_IC7000)
|
||||
{
|
||||
|
@ -2668,6 +2671,8 @@ static int icom_get_mode_without_data(RIG *rig, vfo_t vfo, rmode_t *mode,
|
|||
(RIG_IS_IC706MKII) ||
|
||||
(RIG_IS_IC706MKIIG) ||
|
||||
(RIG_IS_IC756) ||
|
||||
(RIG_IS_IC756PROII) ||
|
||||
(RIG_IS_IC756PROIII) ||
|
||||
(RIG_IS_ICR30))
|
||||
{
|
||||
RETURNFUNC2(RIG_OK);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#define BACKEND_VER "20240303"
|
||||
#define BACKEND_VER "20240415"
|
||||
|
||||
#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
|
||||
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)
|
||||
|
|
|
@ -194,12 +194,12 @@ tone_t kenwood42_ctcss_list[] =
|
|||
*/
|
||||
tone_t kenwood51_ctcss_list[] =
|
||||
{
|
||||
670 , 693, 719, 744, 770, 797, 825, 854, 885, 915, /* 0- 9 */
|
||||
948 , 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, /* 10-19 */
|
||||
1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, /* 20-29 */
|
||||
1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, /* 30-39 */
|
||||
2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, /* 40-49 */
|
||||
17500, 0 /* 50-99 */
|
||||
670, 693, 719, 744, 770, 797, 825, 854, 885, 915, /* 0- 9 */
|
||||
948, 974, 1000, 1035, 1072, 1109, 1148, 1188, 1230, 1273, /* 10-19 */
|
||||
1318, 1365, 1413, 1462, 1514, 1567, 1598, 1622, 1655, 1679, /* 20-29 */
|
||||
1713, 1738, 1773, 1799, 1835, 1862, 1899, 1928, 1966, 1995, /* 30-39 */
|
||||
2035, 2065, 2107, 2181, 2257, 2291, 2336, 2418, 2503, 2541, /* 40-49 */
|
||||
17500, 0 /* 50-99 */
|
||||
};
|
||||
|
||||
/* Token definitions for .cfgparams in rig_caps
|
||||
|
@ -1684,7 +1684,7 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split,
|
|||
RETURNFUNC(-RIG_EINVAL);
|
||||
}
|
||||
|
||||
if (RIG_IS_TS990S)
|
||||
if (RIG_IS_TS990S || RIG_IS_TS890S)
|
||||
{
|
||||
char buf[4];
|
||||
|
||||
|
@ -1745,13 +1745,13 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split,
|
|||
{
|
||||
HAMLIB_TRACE;
|
||||
*txvfo = rs->tx_vfo = priv->tx_vfo = (*split
|
||||
&& !transmitting) ? RIG_VFO_B : RIG_VFO_A;
|
||||
&& !transmitting) ? RIG_VFO_B : RIG_VFO_A;
|
||||
}
|
||||
else if (rs->rx_vfo == RIG_VFO_B)
|
||||
{
|
||||
HAMLIB_TRACE;
|
||||
*txvfo = rs->tx_vfo = priv->tx_vfo = (*split
|
||||
&& !transmitting) ? RIG_VFO_B : RIG_VFO_A;
|
||||
&& !transmitting) ? RIG_VFO_B : RIG_VFO_A;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1841,7 +1841,7 @@ int kenwood_get_vfo_if(RIG *rig, vfo_t *vfo)
|
|||
{
|
||||
case '0':
|
||||
*vfo = rs->rx_vfo = rs->tx_vfo = priv->tx_vfo =
|
||||
split_and_transmitting ? RIG_VFO_B : RIG_VFO_A;
|
||||
split_and_transmitting ? RIG_VFO_B : RIG_VFO_A;
|
||||
|
||||
if (priv->info[32] == '1') { priv->tx_vfo = rs->tx_vfo = RIG_VFO_B; }
|
||||
|
||||
|
@ -2417,8 +2417,9 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
|
||||
if (RIG_IS_TS990S)
|
||||
{
|
||||
if (mode == RIG_MODE_PKTUSB) mode = RIG_MODE_USBD1;
|
||||
if (mode == RIG_MODE_PKTLSB) mode = RIG_MODE_LSBD1;
|
||||
if (mode == RIG_MODE_PKTUSB) { mode = RIG_MODE_USBD1; }
|
||||
|
||||
if (mode == RIG_MODE_PKTLSB) { mode = RIG_MODE_LSBD1; }
|
||||
}
|
||||
|
||||
kmode = rmode2kenwood(mode, caps->mode_table);
|
||||
|
@ -2442,7 +2443,47 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s: kmode=%d, cmode=%c, datamode=%c\n", __func__,
|
||||
kmode, c, data_mode);
|
||||
|
||||
if (RIG_IS_TS990S || RIG_IS_TS890S)
|
||||
if (RIG_IS_TS890S)
|
||||
{
|
||||
char sf[20];
|
||||
// TS890 has SF command -- unique so far
|
||||
if (vfo == RIG_VFO_A)
|
||||
{
|
||||
err = kenwood_transaction(rig, "SF0;", sf, sizeof(sf));
|
||||
if (err != RIG_OK)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: SF0; failed: %s\n", __func__, rigerror(err));
|
||||
return err;
|
||||
}
|
||||
sf[14] = c;
|
||||
err = kenwood_transaction(rig, sf, NULL, 0);
|
||||
if (err != RIG_OK)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: %s failed: %s\n", __func__, sf, rigerror(err));
|
||||
return err;
|
||||
}
|
||||
return RIG_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
err = kenwood_transaction(rig, "SF1;", sf, sizeof(sf));
|
||||
if (err != RIG_OK)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: SF0; failed: %s\n", __func__, rigerror(err));
|
||||
return err;
|
||||
}
|
||||
sf[14] = c;
|
||||
err = kenwood_transaction(rig, sf, NULL, 0);
|
||||
if (err != RIG_OK)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: %s failed: %s\n", __func__, sf, rigerror(err));
|
||||
return err;
|
||||
}
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
}
|
||||
else if (RIG_IS_TS990S)
|
||||
{
|
||||
/* The TS990s has targetable read mode but can only set the mode
|
||||
of the current VFO :( So we need to toggle the operating VFO
|
||||
|
@ -2451,13 +2492,28 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
RIG_TARGETABLE_MODE since the toggle is not required for
|
||||
reading the mode. */
|
||||
vfo_t curr_vfo;
|
||||
err = kenwood_get_vfo_main_sub(rig, &curr_vfo);
|
||||
|
||||
if (RIG_IS_TS990S)
|
||||
{
|
||||
err = kenwood_get_vfo_main_sub(rig, &curr_vfo);
|
||||
}
|
||||
else // RIG_IS_TS890
|
||||
{
|
||||
err = kenwood_get_vfo_if(rig, &curr_vfo);
|
||||
}
|
||||
|
||||
if (err != RIG_OK) { RETURNFUNC2(err); }
|
||||
|
||||
if (vfo != RIG_VFO_CURR && vfo != curr_vfo)
|
||||
{
|
||||
err = kenwood_set_vfo_main_sub(rig, vfo);
|
||||
if (RIG_IS_TS990S)
|
||||
{
|
||||
err = kenwood_set_vfo_main_sub(rig, vfo);
|
||||
}
|
||||
else // RIG_IS_TS890
|
||||
{
|
||||
err = kenwood_set_vfo(rig, vfo);
|
||||
}
|
||||
|
||||
if (err != RIG_OK) { RETURNFUNC2(err); }
|
||||
}
|
||||
|
@ -2467,10 +2523,20 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
|
|||
|
||||
if (err == RIG_OK && vfo != RIG_VFO_CURR && vfo != curr_vfo)
|
||||
{
|
||||
int err2 = kenwood_set_vfo_main_sub(rig, curr_vfo);
|
||||
int err2;
|
||||
|
||||
if (RIG_IS_TS990S)
|
||||
{
|
||||
err2 = kenwood_set_vfo_main_sub(rig, curr_vfo);
|
||||
}
|
||||
else // RIG_IS_TS890
|
||||
{
|
||||
err2 = kenwood_set_vfo(rig, curr_vfo);
|
||||
}
|
||||
|
||||
if (err2 != RIG_OK) { RETURNFUNC2(err2); }
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
else
|
||||
|
@ -2685,9 +2751,10 @@ static int kenwood_get_filter_width(RIG *rig, rmode_t mode, pbwidth_t *width)
|
|||
*/
|
||||
int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
||||
{
|
||||
char cmd[4];
|
||||
char modebuf[10];
|
||||
char cmd[5];
|
||||
char modebuf[20];
|
||||
int offs;
|
||||
int len = 6;
|
||||
int retval;
|
||||
int kmode;
|
||||
|
||||
|
@ -2710,8 +2777,22 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
STATE(rig)->current_vfo = RIG_VFO_A;
|
||||
RETURNFUNC2(RIG_OK);
|
||||
}
|
||||
|
||||
if (RIG_IS_TS990S || RIG_IS_TS890S)
|
||||
if (RIG_IS_TS890S)
|
||||
{
|
||||
len = 16;
|
||||
// TS890 has SF command -- unique so far
|
||||
if (vfo == RIG_VFO_A)
|
||||
{
|
||||
strcpy(cmd,"SF0;");
|
||||
offs = 14;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(cmd,"SF1;");
|
||||
offs = 14;
|
||||
}
|
||||
}
|
||||
else if (RIG_IS_TS990S)
|
||||
{
|
||||
char c;
|
||||
|
||||
|
@ -2754,7 +2835,7 @@ int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
|||
}
|
||||
}
|
||||
|
||||
retval = kenwood_safe_transaction(rig, cmd, modebuf, 6, offs + 1);
|
||||
retval = kenwood_safe_transaction(rig, cmd, modebuf, len, offs + 1);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
|
@ -4443,7 +4524,8 @@ int kenwood_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
}
|
||||
|
||||
/* TODO: replace menu no 57 by a define */
|
||||
SNPRINTF(tonebuf, sizeof(tonebuf), "EX%03d%04d", 57, i + kenwood_caps(rig)->tone_table_base);
|
||||
SNPRINTF(tonebuf, sizeof(tonebuf), "EX%03d%04d", 57,
|
||||
i + kenwood_caps(rig)->tone_table_base);
|
||||
|
||||
RETURNFUNC(kenwood_transaction(rig, tonebuf, NULL, 0));
|
||||
}
|
||||
|
@ -4494,7 +4576,8 @@ int kenwood_set_ctcss_tone_tn(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
RETURNFUNC(-RIG_EINVAL);
|
||||
}
|
||||
|
||||
SNPRINTF(buf, sizeof(buf), "TN%c%02d", c, i + kenwood_caps(rig)->tone_table_base);
|
||||
SNPRINTF(buf, sizeof(buf), "TN%c%02d", c,
|
||||
i + kenwood_caps(rig)->tone_table_base);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4526,12 +4609,12 @@ int kenwood_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
|
|||
caps = rig->caps;
|
||||
|
||||
if (RIG_IS_TS890S)
|
||||
{
|
||||
char buf[5];
|
||||
|
||||
retval = kenwood_safe_transaction(rig, "TN", buf, sizeof(buf), 4);
|
||||
memcpy(tonebuf, buf + 2, 2);
|
||||
}
|
||||
{
|
||||
char buf[5];
|
||||
|
||||
retval = kenwood_safe_transaction(rig, "TN", buf, sizeof(buf), 4);
|
||||
memcpy(tonebuf, buf + 2, 2);
|
||||
}
|
||||
else if (RIG_IS_TS990S)
|
||||
{
|
||||
char cmd[4];
|
||||
|
@ -4644,7 +4727,8 @@ int kenwood_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
|
|||
RETURNFUNC(-RIG_EINVAL);
|
||||
}
|
||||
|
||||
SNPRINTF(buf, sizeof(buf), "CN%c%02d", c, i + kenwood_caps(rig)->tone_table_base);
|
||||
SNPRINTF(buf, sizeof(buf), "CN%c%02d", c,
|
||||
i + kenwood_caps(rig)->tone_table_base);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "token.h"
|
||||
#include "idx_builtin.h"
|
||||
|
||||
#define BACKEND_VER "20240405"
|
||||
#define BACKEND_VER "20240413"
|
||||
|
||||
#define EOM_KEN ';'
|
||||
#define EOM_TH '\r'
|
||||
|
@ -211,6 +211,7 @@ int kenwood_set_vfo_main_sub(RIG *rig, vfo_t vfo);
|
|||
int kenwood_get_vfo_if(RIG *rig, vfo_t *vfo);
|
||||
int kenwood_get_vfo_main_sub(RIG *rig, vfo_t *vfo);
|
||||
int kenwood_set_split(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo);
|
||||
int kenwood_get_vfo_frft(RIG *rig, vfo_t *vfo);
|
||||
int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo);
|
||||
int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split,
|
||||
vfo_t *txvfo);
|
||||
|
|
|
@ -37,7 +37,7 @@ static setting_t bitmap_func, bitmap_level, bitmap_parm;
|
|||
int create_png_range(const freq_range_t rx_range_list[],
|
||||
const freq_range_t tx_range_list[], int num);
|
||||
|
||||
int print_caps_sum(const struct rig_caps *caps, void *data)
|
||||
int print_caps_sum(struct rig_caps *caps, void *data)
|
||||
{
|
||||
|
||||
printf("<TR><TD><A HREF=\"support/model%u.txt\">%s</A></TD><TD>%s</TD>"
|
||||
|
@ -111,7 +111,7 @@ int print_caps_sum(const struct rig_caps *caps, void *data)
|
|||
/*
|
||||
* IO params et al.
|
||||
*/
|
||||
int print_caps_parameters(const struct rig_caps *caps, void *data)
|
||||
int print_caps_parameters(struct rig_caps *caps, void *data)
|
||||
{
|
||||
printf("<A NAME=\"parms%u\"><TR><TD>%s</TD><TD>",
|
||||
caps->rig_model,
|
||||
|
@ -222,7 +222,7 @@ int print_caps_parameters(const struct rig_caps *caps, void *data)
|
|||
*
|
||||
* TODO: add new API calls!
|
||||
*/
|
||||
int print_caps_caps(const struct rig_caps *caps, void *data)
|
||||
int print_caps_caps(struct rig_caps *caps, void *data)
|
||||
{
|
||||
printf("<A NAME=\"caps%u\"><TR><TD>%s</TD>",
|
||||
caps->rig_model,
|
||||
|
@ -270,7 +270,7 @@ int print_caps_caps(const struct rig_caps *caps, void *data)
|
|||
/*
|
||||
* Get/Set parm abilities
|
||||
*/
|
||||
int print_caps_parm(const struct rig_caps *caps, void *data)
|
||||
int print_caps_parm(struct rig_caps *caps, void *data)
|
||||
{
|
||||
setting_t parm;
|
||||
int i;
|
||||
|
@ -307,7 +307,7 @@ int print_caps_parm(const struct rig_caps *caps, void *data)
|
|||
/*
|
||||
* Get/Set level abilities
|
||||
*/
|
||||
int print_caps_level(const struct rig_caps *caps, void *data)
|
||||
int print_caps_level(struct rig_caps *caps, void *data)
|
||||
{
|
||||
setting_t level;
|
||||
int i;
|
||||
|
@ -344,7 +344,7 @@ int print_caps_level(const struct rig_caps *caps, void *data)
|
|||
/*
|
||||
* Get/Set func abilities
|
||||
*/
|
||||
int print_caps_func(const struct rig_caps *caps, void *data)
|
||||
int print_caps_func(struct rig_caps *caps, void *data)
|
||||
{
|
||||
setting_t func;
|
||||
int i;
|
||||
|
@ -383,7 +383,7 @@ int print_caps_func(const struct rig_caps *caps, void *data)
|
|||
*
|
||||
* FIXME: default output pics is for region2: add region 1 too!
|
||||
*/
|
||||
int print_caps_range(const struct rig_caps *caps, void *data)
|
||||
int print_caps_range(struct rig_caps *caps, void *data)
|
||||
{
|
||||
create_png_range(caps->rx_range_list2, caps->tx_range_list2,
|
||||
caps->rig_model);
|
||||
|
|
Ładowanie…
Reference in New Issue