2003-11-16 16:58:35 +00:00
|
|
|
/*
|
|
|
|
* Hamlib Interface - sprintf toolbox
|
2009-06-23 20:30:22 +00:00
|
|
|
* Copyright (c) 2000-2009 by Stephane Fillod
|
|
|
|
* Copyright (c) 2000-2003 by Frank Singleton
|
2003-11-16 16:58:35 +00:00
|
|
|
*
|
|
|
|
*
|
2011-08-22 01:51:06 +00:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2003-11-16 16:58:35 +00:00
|
|
|
*
|
2011-08-22 01:51:06 +00:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
2003-11-16 16:58:35 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2011-08-22 01:51:06 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2003-11-16 16:58:35 +00:00
|
|
|
*
|
2011-08-22 01:51:06 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2003-11-16 16:58:35 +00:00
|
|
|
* License along with this library; if not, write to the Free Software
|
2011-08-22 01:51:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-11-16 16:58:35 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
2017-08-09 18:09:55 +00:00
|
|
|
# include "config.h"
|
2003-11-16 16:58:35 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stdio.h> /* Standard input/output definitions */
|
|
|
|
#include <string.h> /* String function definitions */
|
|
|
|
#include <unistd.h> /* UNIX standard function definitions */
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include <hamlib/rig.h>
|
2019-06-12 20:52:35 +00:00
|
|
|
#include <hamlib/amplifier.h>
|
2003-11-16 16:58:35 +00:00
|
|
|
|
|
|
|
#include "sprintflst.h"
|
|
|
|
#include "misc.h"
|
|
|
|
|
2004-01-15 22:43:59 +00:00
|
|
|
/* #define DUMMY_ALL 0x7ffffffffffffffLL */
|
|
|
|
#define DUMMY_ALL ((setting_t)-1)
|
2003-11-16 16:58:35 +00:00
|
|
|
|
2003-12-04 23:18:49 +00:00
|
|
|
int sprintf_vfo(char *str, vfo_t vfo)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (vfo == RIG_VFO_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2019-12-02 20:46:41 +00:00
|
|
|
for (i = 0; i < 32; i++)
|
2017-10-06 23:58:42 +00:00
|
|
|
{
|
2019-12-24 21:24:01 +00:00
|
|
|
const char *sv;
|
2017-08-09 18:09:55 +00:00
|
|
|
sv = rig_strvfo(vfo & RIG_VFO_N(i));
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (sv && sv[0])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
len += sprintf(str + len, "%s ", sv);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-12-04 23:18:49 +00:00
|
|
|
}
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2003-11-16 16:58:35 +00:00
|
|
|
int sprintf_mode(char *str, rmode_t mode)
|
|
|
|
{
|
2018-12-23 22:41:10 +00:00
|
|
|
uint64_t i, len = 0;
|
2017-08-09 18:09:55 +00:00
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (mode == RIG_MODE_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-12-23 22:41:10 +00:00
|
|
|
for (i = 0; i < 63; i++)
|
2017-10-06 23:58:42 +00:00
|
|
|
{
|
2018-12-23 22:41:10 +00:00
|
|
|
const char *ms = rig_strrmode(mode & (1ULL << i));
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue; /* unknown, FIXME! */
|
|
|
|
}
|
|
|
|
|
|
|
|
strcat(str, ms);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(ms) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-11-16 16:58:35 +00:00
|
|
|
}
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2019-05-30 06:37:49 +00:00
|
|
|
int sprintf_ant(char *str, ant_t ant)
|
|
|
|
{
|
2019-11-30 16:19:08 +00:00
|
|
|
int i, len = 0;
|
2020-02-12 05:32:19 +00:00
|
|
|
char *ant_name;
|
2019-05-30 06:37:49 +00:00
|
|
|
|
2019-11-30 16:19:08 +00:00
|
|
|
*str = '\0';
|
2019-05-30 06:37:49 +00:00
|
|
|
|
2019-11-30 16:19:08 +00:00
|
|
|
if (ant == RIG_ANT_NONE)
|
|
|
|
{
|
2020-02-19 05:10:14 +00:00
|
|
|
sprintf(str, "ANT_NONE");
|
2019-11-30 16:19:08 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2019-05-30 06:37:49 +00:00
|
|
|
|
2019-11-30 16:19:08 +00:00
|
|
|
for (i = 0; i < RIG_ANT_MAX; i++)
|
|
|
|
{
|
|
|
|
if (ant & (1UL << i))
|
|
|
|
{
|
2020-02-12 05:32:19 +00:00
|
|
|
switch(i) {
|
|
|
|
case 0: ant_name = "ANT1";break;
|
|
|
|
case 1: ant_name = "ANT2";break;
|
|
|
|
case 2: ant_name = "ANT3";break;
|
|
|
|
case 3: ant_name = "ANT4";break;
|
|
|
|
case 4: ant_name = "ANT5";break;
|
2020-02-18 05:02:25 +00:00
|
|
|
case 30: ant_name = "ANT_UNKNOWN";break;
|
2020-02-12 05:32:19 +00:00
|
|
|
case 31: ant_name = "ANT_CURR";break;
|
|
|
|
default:
|
|
|
|
ant_name = "ANT_UNK";
|
|
|
|
rig_debug(RIG_DEBUG_ERR,"%s: unknown ant=%d\n", __func__, i);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
len += sprintf(str + len, "%s ", ant_name);
|
2019-11-30 16:19:08 +00:00
|
|
|
}
|
2019-05-30 06:37:49 +00:00
|
|
|
}
|
|
|
|
|
2019-11-30 16:19:08 +00:00
|
|
|
return len;
|
2019-05-30 06:37:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-11-16 16:58:35 +00:00
|
|
|
int sprintf_func(char *str, setting_t func)
|
|
|
|
{
|
2018-12-23 22:41:10 +00:00
|
|
|
uint64_t i, len = 0;
|
2017-08-09 18:09:55 +00:00
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (func == RIG_FUNC_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (i = 0; i < RIG_SETTING_MAX; i++)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
const char *ms = rig_strfunc(func & rig_idx2setting(i));
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue; /* unknown, FIXME! */
|
|
|
|
}
|
|
|
|
|
|
|
|
strcat(str, ms);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(ms) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-11-16 16:58:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int sprintf_level(char *str, setting_t level)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (level == RIG_LEVEL_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (i = 0; i < RIG_SETTING_MAX; i++)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
const char *ms = rig_strlevel(level & rig_idx2setting(i));
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue; /* unknown, FIXME! */
|
|
|
|
}
|
|
|
|
|
|
|
|
strcat(str, ms);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(ms) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-11-16 16:58:35 +00:00
|
|
|
}
|
|
|
|
|
2019-06-12 20:52:35 +00:00
|
|
|
int sprintf_level_amp(char *str, setting_t level)
|
|
|
|
{
|
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
|
|
|
if (level == AMP_LEVEL_NONE)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < RIG_SETTING_MAX; i++)
|
|
|
|
{
|
|
|
|
const char *ms = amp_strlevel(level & rig_idx2setting(i));
|
|
|
|
|
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
|
|
|
continue; /* unknown, FIXME! */
|
|
|
|
}
|
|
|
|
|
|
|
|
strcat(str, ms);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(ms) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2011-06-14 21:18:27 +00:00
|
|
|
int sprintf_level_ext(char *str, const struct confparams *extlevels)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!extlevels)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (; extlevels->token != RIG_CONF_END; extlevels++)
|
|
|
|
{
|
|
|
|
if (!extlevels->name)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue; /* no name */
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
switch (extlevels->type)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
case RIG_CONF_CHECKBUTTON:
|
|
|
|
case RIG_CONF_COMBO:
|
|
|
|
case RIG_CONF_NUMERIC:
|
|
|
|
case RIG_CONF_STRING:
|
2020-01-04 05:59:44 +00:00
|
|
|
case RIG_CONF_BINARY:
|
2017-08-09 18:09:55 +00:00
|
|
|
strcat(str, extlevels->name);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(extlevels->name) + 1;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case RIG_CONF_BUTTON:
|
|
|
|
/* ignore case RIG_CONF_BUTTON */
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2011-06-14 21:18:27 +00:00
|
|
|
}
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2003-11-16 16:58:35 +00:00
|
|
|
int sprintf_level_gran(char *str, setting_t level, const gran_t gran[])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (level == RIG_LEVEL_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (i = 0; i < RIG_SETTING_MAX; i++)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
const char *ms;
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!(level & rig_idx2setting(i)))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
ms = rig_strlevel(level & rig_idx2setting(i));
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
|
|
|
if (level != DUMMY_ALL && level != RIG_LEVEL_SET(DUMMY_ALL))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
rig_debug(RIG_DEBUG_BUG, "unknown level idx %d\n", i);
|
|
|
|
}
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (RIG_LEVEL_IS_FLOAT(rig_idx2setting(i)))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
len += sprintf(str + len,
|
|
|
|
"%s(%g..%g/%g) ",
|
|
|
|
ms,
|
|
|
|
gran[i].min.f,
|
|
|
|
gran[i].max.f,
|
|
|
|
gran[i].step.f);
|
2017-10-06 23:58:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
len += sprintf(str + len,
|
|
|
|
"%s(%d..%d/%d) ",
|
|
|
|
ms,
|
|
|
|
gran[i].min.i,
|
|
|
|
gran[i].max.i,
|
|
|
|
gran[i].step.i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-11-16 16:58:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int sprintf_parm(char *str, setting_t parm)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (parm == RIG_PARM_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (i = 0; i < RIG_SETTING_MAX; i++)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
const char *ms = rig_strparm(parm & rig_idx2setting(i));
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue; /* unknown, FIXME! */
|
|
|
|
}
|
|
|
|
|
|
|
|
strcat(str, ms);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(ms) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-11-16 16:58:35 +00:00
|
|
|
}
|
|
|
|
|
2017-08-09 18:09:55 +00:00
|
|
|
|
2003-11-16 16:58:35 +00:00
|
|
|
int sprintf_parm_gran(char *str, setting_t parm, const gran_t gran[])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (parm == RIG_PARM_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (i = 0; i < RIG_SETTING_MAX; i++)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
const char *ms;
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!(parm & rig_idx2setting(i)))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
ms = rig_strparm(parm & rig_idx2setting(i));
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
|
|
|
if (parm != DUMMY_ALL && parm != RIG_PARM_SET(DUMMY_ALL))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
rig_debug(RIG_DEBUG_BUG, "unknown parm idx %d\n", i);
|
|
|
|
}
|
|
|
|
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (RIG_PARM_IS_FLOAT(rig_idx2setting(i)))
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
len += sprintf(str + len,
|
|
|
|
"%s(%g..%g/%g) ",
|
|
|
|
ms,
|
|
|
|
gran[i].min.f,
|
|
|
|
gran[i].max.f,
|
|
|
|
gran[i].step.f);
|
2017-10-06 23:58:42 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
len += sprintf(str + len,
|
|
|
|
"%s(%d..%d/%d) ",
|
|
|
|
ms,
|
|
|
|
gran[i].min.i,
|
|
|
|
gran[i].max.i,
|
|
|
|
gran[i].step.i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-11-16 16:58:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int sprintf_vfop(char *str, vfo_op_t op)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (op == RIG_OP_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (i = 0; i < 30; i++)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
const char *ms = rig_strvfop(op & (1UL << i));
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue; /* unknown, FIXME! */
|
|
|
|
}
|
|
|
|
|
|
|
|
strcat(str, ms);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(ms) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
2003-11-16 16:58:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int sprintf_scan(char *str, scan_t rscan)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
int i, len = 0;
|
|
|
|
|
|
|
|
*str = '\0';
|
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (rscan == RIG_SCAN_NONE)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2003-11-16 16:58:35 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
for (i = 0; i < 30; i++)
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
const char *ms = rig_strscan(rscan & (1UL << i));
|
2003-11-16 16:58:35 +00:00
|
|
|
|
2017-10-06 23:58:42 +00:00
|
|
|
if (!ms || !ms[0])
|
|
|
|
{
|
2017-08-09 18:09:55 +00:00
|
|
|
continue; /* unknown, FIXME! */
|
|
|
|
}
|
|
|
|
|
|
|
|
strcat(str, ms);
|
|
|
|
strcat(str, " ");
|
|
|
|
len += strlen(ms) + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return len;
|
|
|
|
}
|
2019-05-30 06:37:49 +00:00
|
|
|
|
|
|
|
char *get_rig_conf_type(enum rig_conf_e type)
|
|
|
|
{
|
2019-11-30 16:19:08 +00:00
|
|
|
switch (type)
|
|
|
|
{
|
2019-05-30 06:37:49 +00:00
|
|
|
case RIG_CONF_STRING:
|
2019-11-30 16:19:08 +00:00
|
|
|
return "STRING";
|
|
|
|
|
2019-05-30 06:37:49 +00:00
|
|
|
case RIG_CONF_COMBO:
|
2019-11-30 16:19:08 +00:00
|
|
|
return "COMBO";
|
|
|
|
|
2019-05-30 06:37:49 +00:00
|
|
|
case RIG_CONF_NUMERIC:
|
2019-11-30 16:19:08 +00:00
|
|
|
return "NUMERIC";
|
|
|
|
|
2019-05-30 06:37:49 +00:00
|
|
|
case RIG_CONF_CHECKBUTTON:
|
2019-11-30 16:19:08 +00:00
|
|
|
return "CHECKBUTTON";
|
|
|
|
|
2019-05-30 06:37:49 +00:00
|
|
|
case RIG_CONF_BUTTON:
|
2019-11-30 16:19:08 +00:00
|
|
|
return "BUTTON";
|
2020-01-04 05:59:44 +00:00
|
|
|
|
|
|
|
case RIG_CONF_BINARY:
|
|
|
|
return "BINARY";
|
2019-11-30 16:19:08 +00:00
|
|
|
}
|
2019-05-30 06:37:49 +00:00
|
|
|
|
2019-11-30 16:19:08 +00:00
|
|
|
return "UNKNOWN";
|
2019-05-30 06:37:49 +00:00
|
|
|
}
|