diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 316f643f2..801b730b6 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -4593,6 +4593,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM6%c", cat_term); } + break; case RIG_LEVEL_ALC: @@ -4609,6 +4610,7 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) { snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM4%c", cat_term); } + break; case RIG_LEVEL_RFPOWER_METER: @@ -4624,7 +4626,19 @@ int newcat_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val) } else if (is_ftdx3000 || is_ftdx5000) { - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM6%c", cat_term); + // The 3000 has to use the meter read for SWR when the tuner is on + // We'll assume the 5000 is the same way for now + int tuner; + newcat_get_func(rig, RIG_VFO_A, RIG_FUNC_TUNER, &tuner); + + if (tuner) + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM2%c", cat_term); + } + else + { + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RM6%c", cat_term); + } } else { @@ -11061,7 +11075,8 @@ int newcat_set_clock(RIG *rig, int year, int month, int day, int hour, int min, RETURNFUNC(err); } - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "DT1%02d%02d%02d%c", hour, min, sec, cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "DT1%02d%02d%02d%c", hour, min, + sec, cat_term); if (RIG_OK != (err = newcat_set_cmd(rig))) { @@ -11070,7 +11085,8 @@ int newcat_set_clock(RIG *rig, int year, int month, int day, int hour, int min, RETURNFUNC(err); } - snprintf(priv->cmd_str, sizeof(priv->cmd_str), "DT2%c%04d%c", utc_offset>=0?'+':'-', utc_offset, cat_term); + snprintf(priv->cmd_str, sizeof(priv->cmd_str), "DT2%c%04d%c", + utc_offset >= 0 ? '+' : '-', utc_offset, cat_term); if (RIG_OK != (err = newcat_set_cmd(rig))) { diff --git a/rigs/yaesu/newcat.h b/rigs/yaesu/newcat.h index 3f5ec558d..bf8193485 100644 --- a/rigs/yaesu/newcat.h +++ b/rigs/yaesu/newcat.h @@ -50,7 +50,7 @@ typedef char ncboolean; /* shared function version */ -#define NEWCAT_VER "20211215" +#define NEWCAT_VER "20211216" /* Hopefully large enough for future use, 128 chars plus '\0' */ #define NEWCAT_DATA_LEN 129