Add USB-D and LSB-D to mode_map for Log4OM mode requests

pull/846/head
Mike Black W9MDB 2021-10-16 09:20:24 -05:00
rodzic 83b7243946
commit 4462fe423e
2 zmienionych plików z 35 dodań i 0 usunięć

Wyświetl plik

@ -431,6 +431,8 @@ static const struct
{ RIG_MODE_AMS, "AMS" },
{ RIG_MODE_PKTLSB, "PKTLSB" },
{ RIG_MODE_PKTUSB, "PKTUSB" },
{ RIG_MODE_PKTLSB, "USB-D" },
{ RIG_MODE_PKTUSB, "LSB-D" },
{ RIG_MODE_PKTFM, "PKTFM" },
{ RIG_MODE_PKTFMN, "PKTFMN" },
{ RIG_MODE_ECSSUSB, "ECSSUSB" },

Wyświetl plik

@ -242,6 +242,8 @@ declare_proto_rig(set_cache);
declare_proto_rig(get_cache);
declare_proto_rig(halt);
declare_proto_rig(pause);
declare_proto_rig(password);
declare_proto_rig(set_password);
/*
@ -345,6 +347,8 @@ static struct test_table test_list[] =
{ 0xf7, "get_mode_bandwidths", ACTION(get_mode_bandwidths), ARG_IN | ARG_NOVFO, "Mode" },
{ 0xf1, "halt", ACTION(halt), ARG_NOVFO }, /* rigctld only--halt the daemon */
{ 0x8c, "pause", ACTION(pause), ARG_IN, "Seconds" },
{ 0x98, "password", ACTION(password), ARG_IN, "Password" },
{ 0x99, "set_password", ACTION(set_password), ARG_IN, "Password" },
{ 0x00, "", NULL },
};
@ -2794,6 +2798,10 @@ declare_proto_rig(set_split_mode)
}
mode = rig_parse_mode(arg1);
if (mode == RIG_MODE_NONE)
{
rig_debug(RIG_DEBUG_WARN, "%s: unknown mode=%s\n", __func__, arg1);
}
CHKSCN1ARG(sscanf(arg2, "%d", &width));
RETURNFUNC(rig_set_split_mode(rig, txvfo, mode, (pbwidth_t) width));
}
@ -5085,6 +5093,31 @@ declare_proto_rig(pause)
RETURNFUNC(RIG_OK);
}
char rig_passwd[256];
/* 0x98 */
declare_proto_rig(password)
{
const char *passwd = arg1;
if (strcmp(passwd,rig_passwd)==0) {
rig_debug(RIG_DEBUG_ERR, "%s: #1 password OK\n", __func__);
return(RIG_EINVAL);
}
else{
rig_debug(RIG_DEBUG_ERR, "%s: #2 password error, '%s'!='%s'\n", __func__,passwd,rig_passwd);
}
RETURNFUNC(RIG_OK);
}
/* 0x99 */
declare_proto_rig(set_password)
{
const char *passwd = arg1;
strncpy(rig_passwd, passwd, sizeof(passwd)-1);
rig_debug(RIG_DEBUG_ERR, "%s: set_password %s\n", __func__, rig_passwd);
fprintf(fout, "set_password %s\n", rig_passwd);
RETURNFUNC(RIG_OK);
}
/* '0x8d' */
declare_proto_rig(set_twiddle)
{