kopia lustrzana https://github.com/Hamlib/Hamlib
astyle rigctl_parse.c
rodzic
bdd16c8f20
commit
c85cf58235
|
@ -4721,10 +4721,12 @@ declare_proto_rig(set_powerstat)
|
||||||
CHKSCN1ARG(sscanf(arg1, "%d", &stat));
|
CHKSCN1ARG(sscanf(arg1, "%d", &stat));
|
||||||
|
|
||||||
retval = rig_set_powerstat(rig, (powerstat_t) stat);
|
retval = rig_set_powerstat(rig, (powerstat_t) stat);
|
||||||
|
|
||||||
if (retval == RIG_OK)
|
if (retval == RIG_OK)
|
||||||
{
|
{
|
||||||
rig_powerstat = stat; // update our global so others can see powerstat
|
rig_powerstat = stat; // update our global so others can see powerstat
|
||||||
}
|
}
|
||||||
|
|
||||||
fflush(fin);
|
fflush(fin);
|
||||||
RETURNFUNC2(retval);
|
RETURNFUNC2(retval);
|
||||||
}
|
}
|
||||||
|
@ -4860,6 +4862,7 @@ declare_proto_rig(send_cmd)
|
||||||
{
|
{
|
||||||
int nbytes = 0;
|
int nbytes = 0;
|
||||||
int n = sscanf(arg2, "%d", &nbytes);
|
int n = sscanf(arg2, "%d", &nbytes);
|
||||||
|
|
||||||
if (n == 1) {SNPRINTF(bufcmd, sizeof(bufcmd), "%c %s %d\n", cmd->cmd, arg1, nbytes);}
|
if (n == 1) {SNPRINTF(bufcmd, sizeof(bufcmd), "%c %s %d\n", cmd->cmd, arg1, nbytes);}
|
||||||
else {SNPRINTF(bufcmd, sizeof(bufcmd), "%c %s %s\n", cmd->cmd, arg1, arg2);}
|
else {SNPRINTF(bufcmd, sizeof(bufcmd), "%c %s %s\n", cmd->cmd, arg1, arg2);}
|
||||||
}
|
}
|
||||||
|
@ -4928,6 +4931,7 @@ declare_proto_rig(send_cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
retval = 0;
|
retval = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (arg2) { sscanf(arg2, "%d", &rxbytes); }
|
if (arg2) { sscanf(arg2, "%d", &rxbytes); }
|
||||||
|
@ -5492,7 +5496,9 @@ declare_proto_rig(send_raw)
|
||||||
|
|
||||||
rig_debug(RIG_DEBUG_TRACE, "%s:\n", __func__);
|
rig_debug(RIG_DEBUG_TRACE, "%s:\n", __func__);
|
||||||
|
|
||||||
result = rig_send_raw(rig, (unsigned char *)sendp, arg2_len, buf,buf_len, term);
|
result = rig_send_raw(rig, (unsigned char *)sendp, arg2_len, buf, buf_len,
|
||||||
|
term);
|
||||||
|
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
|
|
Ładowanie…
Reference in New Issue