diff --git a/NEWS b/NEWS index e9982745e..82c2c02ef 100644 --- a/NEWS +++ b/NEWS @@ -7,7 +7,17 @@ Copyright (C) 2000-2021 Michael Black W9MDB, and others Please send Hamlib bug reports to hamlib-developer@lists.sourceforge.net Version 4.2 - * 2021-04-06 + * 2021-04-27 + * New rig_get_vfo_info + * New rig_get_rig_info + Also get_rig_info in rigctld too + Example output with rig in split mode + This is a string return to allow for easy future expansion without changing the API + New tokens may be introduced and can be skipped if not used by clients + VFOA Freq=10133000 Mode=LSB Width=0 RX=1 TX=0 + VFOB Freq=10134000 Mode=LSB Width=0 RX=0 TX=1 + Split=1 SatMode=0 + * USRP lib and gnuradio are deprecated and will be removed in 5.0 * Added Radan rotator * Added Malachite SDR diff --git a/src/rig.c b/src/rig.c index db1722e1c..0fecb56ab 100644 --- a/src/rig.c +++ b/src/rig.c @@ -6229,7 +6229,7 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) txa = split == 0; rxb = !rxa; txb = split == 1; - snprintf(response,max_response_len,"%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\n%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d", rig_strvfo(vfoA), freqA, rig_strrmode(modeA), (int)widthA, rxa, txa, rig_strvfo(vfoB), freqA, rig_strrmode(modeB), (int)widthB, rxb, txb, split, satmode); + snprintf(response,max_response_len,"%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\n%s Freq=%.0f Mode=%s Width=%d RX=%d TX=%d\nSplit=%d SatMode=%d", rig_strvfo(vfoA), freqA, rig_strrmode(modeA), (int)widthA, rxa, txa, rig_strvfo(vfoB), freqB, rig_strrmode(modeB), (int)widthB, rxb, txb, split, satmode); RETURNFUNC(RIG_OK); } diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 06eefd8a5..e1b9a65a8 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -333,7 +333,7 @@ static struct test_table test_list[] = { 0x8f, "dump_state", ACTION(dump_state), ARG_OUT | ARG_NOVFO }, { 0xf0, "chk_vfo", ACTION(chk_vfo), ARG_NOVFO, "ChkVFO" }, /* rigctld only--check for VFO mode */ { 0xf2, "set_vfo_opt", ACTION(set_vfo_opt), ARG_NOVFO | ARG_IN, "Status" }, /* turn vfo option on/off */ - { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_NOVFO | ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ + { 0xf3, "get_vfo_info", ACTION(get_vfo_info), ARG_IN1 | ARG_OUT4, "Freq", "Mode", "Width", "Split", "SatMode" }, /* get several vfo parameters at once */ { 0xf5, "get_rig_info", ACTION(get_rig_info), ARG_NOVFO | ARG_OUT, "RigInfo" }, /* get several vfo parameters at once */ { 0xf4, "get_vfo_list", ACTION(get_vfo_list), ARG_OUT | ARG_NOVFO, "VFOs" }, { 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */