2001-05-04 22:47:35 +00:00
|
|
|
/*
|
|
|
|
* dumpmem.c - Copyright (C) 2001 Stephane Fillod
|
|
|
|
* This programs dumps the mmeory contents of a rig.
|
|
|
|
*
|
|
|
|
*
|
2011-08-22 01:51:06 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2001-05-04 22:47:35 +00:00
|
|
|
*
|
2011-08-22 01:51:06 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2001-05-04 22:47:35 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <hamlib/rig.h>
|
2013-12-11 02:14:22 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
2017-08-09 18:09:55 +00:00
|
|
|
# include "config.h"
|
2013-12-11 02:14:22 +00:00
|
|
|
#endif
|
|
|
|
|
2001-05-04 22:47:35 +00:00
|
|
|
#include "misc.h"
|
|
|
|
|
|
|
|
#define SERIAL_PORT "/dev/ttyS0"
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2019-11-30 16:19:08 +00:00
|
|
|
static char *decode_modes(rmode_t modes);
|
2001-05-04 22:47:35 +00:00
|
|
|
static int dump_chan(RIG *rig, int chan_num);
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
2011-08-22 01:51:06 +00:00
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
RIG *my_rig;
|
|
|
|
int status, i, j;
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (argc != 2)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
fprintf(stderr, "%s <rig_num>\n", argv[0]);
|
|
|
|
exit(1);
|
|
|
|
}
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
my_rig = rig_init(atoi(argv[1]));
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!my_rig)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
fprintf(stderr, "Unknown rig num: %d\n", atoi(argv[1]));
|
|
|
|
fprintf(stderr, "Please check riglist.h\n");
|
|
|
|
exit(1); /* whoops! something went wrong (mem alloc?) */
|
|
|
|
}
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2021-03-09 16:16:18 +00:00
|
|
|
strncpy(my_rig->state.rigport.pathname, SERIAL_PORT, HAMLIB_FILPATHLEN - 1);
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_open(my_rig))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
exit(2);
|
|
|
|
}
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
status = rig_set_vfo(my_rig, RIG_VFO_B);
|
2001-05-04 22:47:35 +00:00
|
|
|
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (status != RIG_OK)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("rig_set_vfo: error = %s \n", rigerror(status));
|
|
|
|
}
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
/*
|
|
|
|
* chan_t is used to describe what memory your rig is equipped with
|
|
|
|
* cf. chan_list field in caps
|
|
|
|
* Example for the Ic706MkIIG (99 memory channels, 2 scan edges, 2 call chans):
|
|
|
|
* chan_t chan_list[] = {
|
|
|
|
* { 1, 99, RIG_MTYPE_MEM, 0 },
|
|
|
|
* { 100, 103, RIG_MTYPE_EDGE, 0 },
|
|
|
|
* { 104, 105, RIG_MTYPE_CALL, 0 },
|
|
|
|
* RIG_CHAN_END
|
|
|
|
* }
|
|
|
|
*/
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2019-12-09 05:42:47 +00:00
|
|
|
for (i = 0; my_rig->state.chan_list[i].type; i++)
|
2017-10-06 23:58:42 +00:00
|
|
|
{
|
2019-08-23 13:16:51 +00:00
|
|
|
for (j = my_rig->state.chan_list[i].startc;
|
2019-11-30 16:19:08 +00:00
|
|
|
j <= my_rig->state.chan_list[i].endc; j++)
|
2017-10-06 23:58:42 +00:00
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
dump_chan(my_rig, j);
|
|
|
|
}
|
|
|
|
}
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
rig_close(my_rig); /* close port */
|
|
|
|
rig_cleanup(my_rig); /* if you care about memory */
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("port %s closed ok \n", SERIAL_PORT);
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
2001-05-04 22:47:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NB: this function is not reentrant, because of the static buf.
|
2017-08-09 18:09:55 +00:00
|
|
|
* but who cares? --SF
|
2001-05-04 22:47:35 +00:00
|
|
|
*/
|
2019-11-30 16:19:08 +00:00
|
|
|
static char *decode_modes(rmode_t modes)
|
2001-05-04 22:47:35 +00:00
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
static char buf[80];
|
|
|
|
|
|
|
|
buf[0] = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (modes & RIG_MODE_AM)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(buf, "AM ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (modes & RIG_MODE_CW)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(buf, "CW ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (modes & RIG_MODE_USB)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(buf, "USB ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (modes & RIG_MODE_LSB)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(buf, "LSB ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (modes & RIG_MODE_RTTY)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(buf, "RTTY ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (modes & RIG_MODE_FM)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(buf, "FM ");
|
|
|
|
}
|
|
|
|
|
2001-05-04 22:47:35 +00:00
|
|
|
#ifdef RIG_MODE_WFM
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (modes & RIG_MODE_WFM)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(buf, "WFM ");
|
|
|
|
}
|
|
|
|
|
2001-05-04 22:47:35 +00:00
|
|
|
#endif
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
return buf;
|
2001-05-04 22:47:35 +00:00
|
|
|
}
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2001-05-04 22:47:35 +00:00
|
|
|
int dump_chan(RIG *rig, int chan_num)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
channel_t chan;
|
|
|
|
int status;
|
|
|
|
char freqbuf[20];
|
|
|
|
|
|
|
|
chan.vfo = RIG_VFO_MEM;
|
|
|
|
chan.channel_num = chan_num;
|
2020-12-02 13:10:12 +00:00
|
|
|
status = rig_get_channel(rig, RIG_VFO_NONE, &chan, 1);
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (status != RIG_OK)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("rig_get_channel: error = %s \n", rigerror(status));
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("Channel: %d\n", chan.channel_num);
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.freq);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("Frequency: %s\n", freqbuf);
|
|
|
|
printf("Mode: %s\n", decode_modes(chan.mode));
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.width);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("Width: %s\n", freqbuf);
|
2020-03-23 12:52:01 +00:00
|
|
|
printf("VFO: %s\n", rig_strvfo(chan.vfo));
|
2001-05-04 22:47:35 +00:00
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("Split: %d\n", chan.split);
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.tx_freq);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("TXFrequency: %s\n", freqbuf);
|
|
|
|
printf("TXMode: %s\n", decode_modes(chan.tx_mode));
|
|
|
|
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.tx_width);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("TXWidth: %s\n", freqbuf);
|
|
|
|
|
|
|
|
printf("Shift: %s\n", rig_strptrshift(chan.rptr_shift));
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.rptr_offs);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("Offset: %s%s\n", chan.rptr_offs > 0 ? "+" : "", freqbuf);
|
|
|
|
|
2020-03-23 12:52:01 +00:00
|
|
|
printf("Antenna: %u\n", chan.ant);
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.tuning_step);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("Step: %s\n", freqbuf);
|
|
|
|
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.rit);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("RIT: %s%s\n", chan.rit > 0 ? "+" : "", freqbuf);
|
|
|
|
|
2021-03-03 14:03:18 +00:00
|
|
|
sprintf_freq(freqbuf, sizeof(freqbuf), chan.xit);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("XIT: %s%s\n", chan.xit > 0 ? "+" : "", freqbuf);
|
2020-03-23 12:52:01 +00:00
|
|
|
printf("CTCSS: %u.%uHz\n", chan.ctcss_tone / 10, chan.ctcss_tone % 10);
|
|
|
|
printf("CTCSSsql: %u.%uHz\n", chan.ctcss_sql / 10, chan.ctcss_sql % 10);
|
|
|
|
printf("DCS: %u.%u\n", chan.dcs_code / 10, chan.dcs_code % 10);
|
|
|
|
printf("DCSsql: %u.%u\n", chan.dcs_sql / 10, chan.dcs_sql % 10);
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("Name: %s\n", chan.channel_desc);
|
|
|
|
|
|
|
|
printf("Functions: ");
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs != 0)
|
|
|
|
{
|
|
|
|
if (chan.funcs & RIG_FUNC_FAGC)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("FAGC ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_NB)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("NB ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_COMP)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("COMP ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_VOX)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("VOX ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_TONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("TONE ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_TSQL)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("TSQL ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_SBKIN)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("SBKIN ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_FBKIN)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("FBKIN ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_ANF)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("ANF ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_NR)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("NR ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_AIP)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("AIP ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_APF)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("APF ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_MON)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("MON ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_MN)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("MN ");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (chan.funcs & RIG_FUNC_RF)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("RF ");
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("\n");
|
2017-10-06 23:58:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("none\n");
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_PREAMP))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("PREAMP: %ddB\n", chan.levels[rig_setting2idx(RIG_LEVEL_PREAMP)].i);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_ATT))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("ATT: %ddB\n", chan.levels[rig_setting2idx(RIG_LEVEL_ATT)].i);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_AF))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("AF: %g%%\n", 100 * chan.levels[rig_setting2idx(RIG_LEVEL_AF)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_RF))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("RF: %g%%\n", 100 * chan.levels[rig_setting2idx(RIG_LEVEL_RF)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_SQL))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("SQL: %g%%\n", 100 * chan.levels[rig_setting2idx(RIG_LEVEL_SQL)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_IF))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("IF: %dHz\n", chan.levels[rig_setting2idx(RIG_LEVEL_IF)].i);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_APF))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("APF: %g%%\n", 100 * chan.levels[rig_setting2idx(RIG_LEVEL_APF)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_NR))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("NR: %g%%\n", 100 * chan.levels[rig_setting2idx(RIG_LEVEL_NR)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_PBT_IN))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("PBT_IN: %g%%\n",
|
|
|
|
100 * chan.levels[rig_setting2idx(RIG_LEVEL_PBT_IN)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_PBT_OUT))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("PBT_OUT: %g%%\n",
|
|
|
|
100 * chan.levels[rig_setting2idx(RIG_LEVEL_PBT_OUT)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_CWPITCH))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("CWPITCH: %dHz\n", chan.levels[rig_setting2idx(RIG_LEVEL_CWPITCH)].i);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_RFPOWER))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("RFPOWER: %g%%\n",
|
|
|
|
100 * chan.levels[rig_setting2idx(RIG_LEVEL_RFPOWER)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_MICGAIN))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("MICGAIN: %g%%\n",
|
|
|
|
100 * chan.levels[rig_setting2idx(RIG_LEVEL_MICGAIN)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_COMP))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("COMP: %g%%\n", 100 * chan.levels[rig_setting2idx(RIG_LEVEL_COMP)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_BALANCE))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("BALANCE: %g%%\n",
|
|
|
|
100 * chan.levels[rig_setting2idx(RIG_LEVEL_BALANCE)].f);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_KEYSPD))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("KEYSPD: %d\n", chan.levels[rig_setting2idx(RIG_LEVEL_KEYSPD)].i);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_NOTCHF))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("NOTCHF: %d\n", chan.levels[rig_setting2idx(RIG_LEVEL_NOTCHF)].i);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_AGC))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("AGC: %d\n", chan.levels[rig_setting2idx(RIG_LEVEL_AGC)].i);
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rig_has_set_level(rig, RIG_LEVEL_BKINDL))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
printf("BKINDL: %d\n", chan.levels[rig_setting2idx(RIG_LEVEL_BKINDL)].i);
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|