diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 03b5ea919..4ea5149a7 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1123,7 +1123,7 @@ typedef uint64_t setting_t; #define RIG_FUNC_TRANSCEIVE CONSTANT_64BIT_FLAG (42) /*!< \c TRANSCEIVE -- Send radio state changes automatically ON/OFF */ #define RIG_FUNC_SPECTRUM CONSTANT_64BIT_FLAG (43) /*!< \c SPECTRUM -- Spectrum scope data output ON/OFF */ #define RIG_FUNC_SPECTRUM_HOLD CONSTANT_64BIT_FLAG (44) /*!< \c SPECTRUM_HOLD -- Pause spectrum scope updates ON/OFF */ -#define RIG_FUNC_SEND_VOICE_MEM CONSTANT_64BIT_FLAG (45) /*!< \c For sending voice memory */ +#define RIG_FUNC_BIT45 CONSTANT_64BIT_FLAG (45) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT46 CONSTANT_64BIT_FLAG (46) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT47 CONSTANT_64BIT_FLAG (47) /*!< \c available for future RIG_FUNC items */ #define RIG_FUNC_BIT48 CONSTANT_64BIT_FLAG (48) /*!< \c available for future RIG_FUNC items */ diff --git a/rigs/yaesu/ft991.c b/rigs/yaesu/ft991.c index a2251976d..f80c8ccde 100644 --- a/rigs/yaesu/ft991.c +++ b/rigs/yaesu/ft991.c @@ -67,7 +67,7 @@ const struct rig_caps ft991_caps = RIG_MODEL(RIG_MODEL_FT991), .model_name = "FT-991", .mfg_name = "Yaesu", - .version = NEWCAT_VER ".5", + .version = NEWCAT_VER ".6", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -245,6 +245,7 @@ const struct rig_caps ft991_caps = .set_channel = newcat_set_channel, .get_channel = newcat_get_channel, .send_morse = newcat_send_morse, + .send_voice_mem = newcat_send_voice_mem, }; diff --git a/rigs/yaesu/ft991.h b/rigs/yaesu/ft991.h index 8e3c08be3..f100fe4e3 100644 --- a/rigs/yaesu/ft991.h +++ b/rigs/yaesu/ft991.h @@ -65,7 +65,7 @@ RIG_FUNC_MON|RIG_FUNC_NB|RIG_FUNC_NR|RIG_FUNC_VOX|\ RIG_FUNC_FBKIN|RIG_FUNC_COMP|RIG_FUNC_ANF|RIG_FUNC_MN|\ RIG_FUNC_RIT|RIG_FUNC_XIT|\ - RIG_FUNC_TUNER|RIG_FUNC_SEND_VOICE_MEM) + RIG_FUNC_TUNER) #define FT991_VFO_OPS (RIG_OP_TUNE|RIG_OP_CPY|RIG_OP_XCHG|\ RIG_OP_UP|RIG_OP_DOWN|RIG_OP_BAND_UP|RIG_OP_BAND_DOWN|\ diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 4668e4acc..cf8c49a57 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -5552,15 +5552,6 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status) cat_term); break; - case RIG_FUNC_SEND_VOICE_MEM: - if (!newcat_valid_command(rig, "PB")) - { - RETURNFUNC(-RIG_ENAVAIL); - } - - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PB0%d%c", status, cat_term); - break; - default: RETURNFUNC(-RIG_EINVAL); } @@ -10165,3 +10156,18 @@ rmode_t newcat_rmode_width(RIG *rig, vfo_t vfo, char mode, pbwidth_t *width) RETURNFUNC('0'); } + +int newcat_send_voice_mem(RIG *rig, vfo_t vfo, int ch) +{ + char *p1 = "0"; // newer rigs have 2 bytes where is fixed at zero e.g. FT991 + struct newcat_priv_data *priv = (struct newcat_priv_data *)rig->state.priv; + if (!newcat_valid_command(rig, "PB")) + { + RETURNFUNC(-RIG_ENAVAIL); + } + // we don't do any channel checking -- varies by rig -- could do it but not critical + + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PB%s%d%c", p1, ch, cat_term); + RETURNFUNC(newcat_set_cmd(rig)); +} + diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 903123bfc..e75ae1419 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20211018" +#define NEWCAT_VER "20211022" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129 @@ -221,6 +221,7 @@ int newcat_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val); int newcat_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val); int newcat_send_morse(RIG *rig, vfo_t vfo, const char *msg); +int newcat_send_voice_mem(RIG *rig, vfo_t vfo, int ch); #define TOKEN_BACKEND(t) (t) diff --git a/src/misc.c b/src/misc.c index f4b06d1f4..cc0f3576d 100644 --- a/src/misc.c +++ b/src/misc.c @@ -692,7 +692,6 @@ static const struct { RIG_FUNC_TRANSCEIVE, "TRANSCEIVE" }, { RIG_FUNC_SPECTRUM, "SPECTRUM" }, { RIG_FUNC_SPECTRUM_HOLD, "SPECTRUM_HOLD" }, - { RIG_FUNC_SEND_VOICE_MEM , "VOICE_MEM" }, { RIG_FUNC_NONE, "" }, };