From aaac79c55e5750708c6d9451c9602ac0f94c1168 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Wed, 12 Jan 2022 18:05:47 -0600 Subject: [PATCH] Allow barrett to program and unprogrammed channel https://github.com/Hamlib/Hamlib/issues/923 --- rigs/barrett/950.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rigs/barrett/950.c b/rigs/barrett/950.c index 98017d6f2..c7fac7205 100644 --- a/rigs/barrett/950.c +++ b/rigs/barrett/950.c @@ -202,7 +202,12 @@ 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) != 3) + if (strstr(response,"E5")) + { + freq_rx = freq_tx = 0; + rig_debug(RIG_DEBUG_VERBOSE, "%s: new channel being programmed\n", __func__); + } + else 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);