kopia lustrzana https://github.com/Hamlib/Hamlib
Add voice_mem functions for TS590S/SG and TS-2000
Increase max baud for TS-2000 to 115200 Change TS-2000 to hardware handshake defaultpull/1389/head
rodzic
6644afbf8d
commit
5e4cb6f1c1
|
@ -5351,7 +5351,29 @@ int kenwood_send_voice_mem(RIG *rig, vfo_t vfo, int bank)
|
||||||
SNPRINTF(cmd, sizeof(cmd), "PB01");
|
SNPRINTF(cmd, sizeof(cmd), "PB01");
|
||||||
kenwood_transaction(rig, cmd, NULL, 0);
|
kenwood_transaction(rig, cmd, NULL, 0);
|
||||||
#endif
|
#endif
|
||||||
SNPRINTF(cmd, sizeof(cmd), "PB1%d1", bank);
|
if (rig->caps->rig_model == RIG_MODEL_TS2000 && (bank < 1 || bank > 3))
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: TS2000 channel is from 1 to 3\n", __func__);
|
||||||
|
return -RIG_EINVAL;
|
||||||
|
}
|
||||||
|
// some rigs have 5 channels -- newew ones have 10 channels
|
||||||
|
if ((bank < 1 || bank > 5)
|
||||||
|
&& (rig->caps->rig_model == RIG_MODEL_TS590SG
|
||||||
|
|| rig->caps->rig_model == RIG_MODEL_TS590S))
|
||||||
|
{
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s: TS590S/SG channel is from 1 to 5\n", __func__);
|
||||||
|
return -RIG_EINVAL;
|
||||||
|
}
|
||||||
|
if (rig->caps->rig_model == RIG_MODEL_TS2000
|
||||||
|
|| (rig->caps->rig_model == RIG_MODEL_TS590SG
|
||||||
|
|| rig->caps->rig_model == RIG_MODEL_TS590S))
|
||||||
|
{
|
||||||
|
SNPRINTF(cmd, sizeof(cmd), "PB%d", bank);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SNPRINTF(cmd, sizeof(cmd), "PB1%d1", bank);
|
||||||
|
}
|
||||||
priv->voice_bank = bank;
|
priv->voice_bank = bank;
|
||||||
RETURNFUNC(kenwood_transaction(rig, cmd, NULL, 0));
|
RETURNFUNC(kenwood_transaction(rig, cmd, NULL, 0));
|
||||||
}
|
}
|
||||||
|
@ -5361,7 +5383,14 @@ int kenwood_stop_voice_mem(RIG *rig, vfo_t vfo)
|
||||||
char cmd[16];
|
char cmd[16];
|
||||||
struct kenwood_priv_data *priv = rig->state.priv;
|
struct kenwood_priv_data *priv = rig->state.priv;
|
||||||
ENTERFUNC;
|
ENTERFUNC;
|
||||||
SNPRINTF(cmd, sizeof(cmd), "PB1%d0", priv->voice_bank);
|
if (rig->caps->rig_model == RIG_MODEL_TS2000)
|
||||||
|
{
|
||||||
|
SNPRINTF(cmd, sizeof(cmd), "PB0");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SNPRINTF(cmd, sizeof(cmd), "PB1%d0", priv->voice_bank);
|
||||||
|
}
|
||||||
RETURNFUNC(kenwood_transaction(rig, cmd, NULL, 0));
|
RETURNFUNC(kenwood_transaction(rig, cmd, NULL, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "token.h"
|
#include "token.h"
|
||||||
#include "idx_builtin.h"
|
#include "idx_builtin.h"
|
||||||
|
|
||||||
#define BACKEND_VER "20230916"
|
#define BACKEND_VER "20230925"
|
||||||
|
|
||||||
#define EOM_KEN ';'
|
#define EOM_KEN ';'
|
||||||
#define EOM_TH '\r'
|
#define EOM_TH '\r'
|
||||||
|
|
|
@ -1676,7 +1676,7 @@ const struct rig_caps ts2000_caps =
|
||||||
RIG_MODEL(RIG_MODEL_TS2000),
|
RIG_MODEL(RIG_MODEL_TS2000),
|
||||||
.model_name = "TS-2000",
|
.model_name = "TS-2000",
|
||||||
.mfg_name = "Kenwood",
|
.mfg_name = "Kenwood",
|
||||||
.version = BACKEND_VER ".1",
|
.version = BACKEND_VER ".2",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -1684,11 +1684,11 @@ const struct rig_caps ts2000_caps =
|
||||||
.dcd_type = RIG_DCD_RIG,
|
.dcd_type = RIG_DCD_RIG,
|
||||||
.port_type = RIG_PORT_SERIAL,
|
.port_type = RIG_PORT_SERIAL,
|
||||||
.serial_rate_min = 1200,
|
.serial_rate_min = 1200,
|
||||||
.serial_rate_max = 57600,
|
.serial_rate_max = 115200,
|
||||||
.serial_data_bits = 8,
|
.serial_data_bits = 8,
|
||||||
.serial_stop_bits = 1,
|
.serial_stop_bits = 1,
|
||||||
.serial_parity = RIG_PARITY_NONE,
|
.serial_parity = RIG_PARITY_NONE,
|
||||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
|
||||||
.write_delay = 0,
|
.write_delay = 0,
|
||||||
.post_write_delay = 0, /* ms */
|
.post_write_delay = 0, /* ms */
|
||||||
.timeout = 200,
|
.timeout = 200,
|
||||||
|
@ -1896,6 +1896,8 @@ const struct rig_caps ts2000_caps =
|
||||||
.get_ant = kenwood_get_ant,
|
.get_ant = kenwood_get_ant,
|
||||||
.send_morse = kenwood_send_morse,
|
.send_morse = kenwood_send_morse,
|
||||||
.wait_morse = rig_wait_morse,
|
.wait_morse = rig_wait_morse,
|
||||||
|
.send_voice_mem = kenwood_send_voice_mem,
|
||||||
|
.stop_voice_mem = kenwood_stop_voice_mem,
|
||||||
.vfo_op = kenwood_vfo_op,
|
.vfo_op = kenwood_vfo_op,
|
||||||
.scan = kenwood_scan,
|
.scan = kenwood_scan,
|
||||||
.set_mem = kenwood_set_mem,
|
.set_mem = kenwood_set_mem,
|
||||||
|
|
|
@ -1749,7 +1749,7 @@ const struct rig_caps fx4_caps =
|
||||||
RIG_MODEL(RIG_MODEL_FX4),
|
RIG_MODEL(RIG_MODEL_FX4),
|
||||||
.model_name = "FX4/C/CR/L",
|
.model_name = "FX4/C/CR/L",
|
||||||
.mfg_name = "BG2FX",
|
.mfg_name = "BG2FX",
|
||||||
.version = BACKEND_VER ".7",
|
.version = BACKEND_VER ".8",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -1926,6 +1926,8 @@ const struct rig_caps fx4_caps =
|
||||||
.send_morse = kenwood_send_morse,
|
.send_morse = kenwood_send_morse,
|
||||||
.stop_morse = kenwood_stop_morse,
|
.stop_morse = kenwood_stop_morse,
|
||||||
.wait_morse = rig_wait_morse,
|
.wait_morse = rig_wait_morse,
|
||||||
|
.send_voice_mem = kenwood_send_voice_mem,
|
||||||
|
.stop_voice_mem = kenwood_stop_voice_mem,
|
||||||
.set_mem = kenwood_set_mem,
|
.set_mem = kenwood_set_mem,
|
||||||
.get_mem = kenwood_get_mem,
|
.get_mem = kenwood_get_mem,
|
||||||
.vfo_ops = TS590_VFO_OPS,
|
.vfo_ops = TS590_VFO_OPS,
|
||||||
|
|
Ładowanie…
Reference in New Issue