diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index d136de7d0..eb44fec8d 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2227,7 +2227,11 @@ declare_proto_rig(get_vfo_info) split_t split; retval = rig_get_vfo_info(rig, vfo, &freq, &mode, &width, &split); - rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); + if (retval != RIG_OK) + { + rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s\n", __func__, rig_strvfo(vfo)); + } + rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s, freq=%.0f, mode=%s, width=%d\n", __func__, rig_strvfo(vfo), freq, rig_strrmode(mode), (int)width); if ((interactive && prompt) || (interactive && !prompt && ext_resp)) { diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index e78e2b4cb..a94489591 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -878,9 +878,28 @@ static int handle_ts2000(void *arg) return write_block2((void *)__func__, &my_com, response, strlen(response)); } // Now some commands to set things - else if (strncmp(arg,"SA",2) == 0) + else if (strncmp(arg, "SA", 2) == 0) { - // todo -- make rigs changes based on TS-2000 bit flags + if (strcmp(arg, "SA;") == 0) + { + // should we silently fail with RIG_OK instead? TBD + RETURNFUNC(-RIG_ENIMPL); + } + + if (strlen(arg) > 3 && ((char *)arg)[2] == '1') + { + if (my_rig->caps->has_set_func) + { + int retval = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_SATMODE, + ((char *)arg)[2] == '1' ? 1 : 0); + return retval; + } + else + { + RETURNFUNC(-RIG_ENAVAIL); + } + } + return RIG_OK; } else if (strcmp(arg, "TX;") == 0)