From 1d19a0ffbc219d1419610929867029254e7206b1 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Fri, 7 Jan 2022 16:20:26 -0600 Subject: [PATCH] Fix Barret set_freq and serial# and new try on software version --- rigs/barrett/4050.c | 4 ++-- rigs/barrett/950.c | 2 +- rigs/barrett/barrett.c | 7 ++----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/rigs/barrett/4050.c b/rigs/barrett/4050.c index e752fe58b..d685749d4 100644 --- a/rigs/barrett/4050.c +++ b/rigs/barrett/4050.c @@ -84,7 +84,7 @@ const struct rig_caps barrett4050_caps = RIG_MODEL(RIG_MODEL_BARRETT_4050), .model_name = "4050", .mfg_name = "Barrett", - .version = BACKEND_VER ".0", + .version = BACKEND_VER ".0a", .copyright = "LGPL", .status = RIG_STATUS_ALPHA, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -202,7 +202,7 @@ int barrett4050_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return retval; } - if (sscanf(response, "%4d%8lf%8lf", &chan, &freq_rx, &freq_tx) != 2) + if (sscanf(response, "%4d%8lf%8lf", &chan, &freq_rx, &freq_tx) != 3) { rig_debug(RIG_DEBUG_ERR, "%s: unable to parse chan/freq from %s\n", __func__, response); diff --git a/rigs/barrett/950.c b/rigs/barrett/950.c index 79531e06c..bdf9e8d86 100644 --- a/rigs/barrett/950.c +++ b/rigs/barrett/950.c @@ -200,7 +200,7 @@ int barrett950_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return retval; } - if (sscanf(response, "%4d%8lf%8lf", &chan, &freq_rx, &freq_tx) != 2) + if (sscanf(response, "%4d%8lf%8lf", &chan, &freq_rx, &freq_tx) != 3) { rig_debug(RIG_DEBUG_ERR, "%s: unable to parse chan/freq from %s\n", __func__, response); diff --git a/rigs/barrett/barrett.c b/rigs/barrett/barrett.c index 37226d251..7c1d81403 100644 --- a/rigs/barrett/barrett.c +++ b/rigs/barrett/barrett.c @@ -659,15 +659,12 @@ const char *barrett_get_info(RIG *rig) { rig_debug(RIG_DEBUG_WARN, "%s: IDS command failed: %s\n", __func__, strerror(retval)); - } - else - { response = "unknown"; } rig_debug(RIG_DEBUG_VERBOSE, "%s: Barrett series %s, serial# %s\n", __func__, series, response); - retval = barrett_transaction(rig, "IVF", 0, &response); + retval = barrett_transaction(rig, "IV", 0, &response); if (retval == RIG_OK) { @@ -675,7 +672,7 @@ const char *barrett_get_info(RIG *rig) } else { - rig_debug(RIG_DEBUG_VERBOSE, "Software Version %s\n", response); + rig_debug(RIG_DEBUG_VERBOSE, "Barrett software Version %s\n", response); } return response;