kopia lustrzana https://github.com/Hamlib/Hamlib
Astyle files
rodzic
b4150fce19
commit
c34f719337
|
@ -1071,9 +1071,11 @@ static int netrigctl_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
|
|||
char buf[BUF_MAX];
|
||||
char vfostr[16] = "";
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, ptt=%d, ptt_type=%d\n", __func__,
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, ptt=%d, ptt_type=%d\n",
|
||||
__func__,
|
||||
rig_strvfo(vfo), ptt, rig->state.pttport.type.ptt);
|
||||
if(rig->state.pttport.type.ptt == RIG_PTT_NONE) return RIG_OK;
|
||||
|
||||
if (rig->state.pttport.type.ptt == RIG_PTT_NONE) { return RIG_OK; }
|
||||
|
||||
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
|
||||
|
||||
|
|
|
@ -814,7 +814,8 @@ static vfo_t icom_current_vfo_x25(RIG *rig)
|
|||
{
|
||||
// we can't change freqs unless rig is idle and we don't know that
|
||||
// so we only check vfo once when freqs are equal
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: vfo already determined...returning current_vfo\n",
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: vfo already determined...returning current_vfo\n",
|
||||
__func__);
|
||||
return rig->state.current_vfo;
|
||||
}
|
||||
|
@ -1882,7 +1883,8 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
|
|||
}
|
||||
}
|
||||
|
||||
if (RIG_MODEL_X108G == rig->caps->rig_model || RIG_MODEL_X5105 == rig->caps->rig_model)
|
||||
if (RIG_MODEL_X108G == rig->caps->rig_model
|
||||
|| RIG_MODEL_X5105 == rig->caps->rig_model)
|
||||
{
|
||||
priv->no_1a_03_cmd = ENUM_1A_03_NO;
|
||||
}
|
||||
|
@ -3455,7 +3457,8 @@ int icom_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
int found = 0;
|
||||
|
||||
for (i = 0;
|
||||
i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST && priv_caps->agc_levels[i].icom_level >= 0; i++)
|
||||
i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST
|
||||
&& priv_caps->agc_levels[i].icom_level >= 0; i++)
|
||||
{
|
||||
if (priv_caps->agc_levels[i].level == val.i)
|
||||
{
|
||||
|
|
|
@ -4941,6 +4941,7 @@ int kenwood_send_morse(RIG *rig, vfo_t vfo, const char *msg)
|
|||
* If answer is something else, return with error to prevent infinite loops
|
||||
*/
|
||||
if (!strncmp(m2, "KY0", 3)) { break; }
|
||||
|
||||
if (!strncmp(m2, "KY2", 3)) { break; }
|
||||
|
||||
if (!strncmp(m2, "KY1", 3)) { hl_usleep(500000); }
|
||||
|
|
|
@ -547,7 +547,8 @@ int ft747_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
|
||||
p = (struct ft747_priv_data *)rig->state.priv;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "ft747: requested freq = %"PRIfreq" Hz vfo = %s \n", freq, rig_strvfo(vfo));
|
||||
rig_debug(RIG_DEBUG_VERBOSE,
|
||||
"ft747: requested freq = %"PRIfreq" Hz vfo = %s \n", freq, rig_strvfo(vfo));
|
||||
|
||||
/*
|
||||
* Copy native cmd freq_set to private cmd storage area
|
||||
|
@ -579,12 +580,15 @@ int ft747_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
freq_t f;
|
||||
int ret;
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: called vfo=%s, freqMainA=%.0f, freqMainB=%.0f\n", __func__, rig_strvfo(vfo), rig->state.cache.freqMainA, rig->state.cache.freqMainB);
|
||||
rig_debug(RIG_DEBUG_VERBOSE,
|
||||
"%s: called vfo=%s, freqMainA=%.0f, freqMainB=%.0f\n", __func__,
|
||||
rig_strvfo(vfo), rig->state.cache.freqMainA, rig->state.cache.freqMainB);
|
||||
|
||||
if (vfo == RIG_VFO_CURR) { vfo = rig->state.cache.vfo; }
|
||||
|
||||
if (vfo == RIG_VFO_CURR) vfo = rig->state.cache.vfo;
|
||||
if (rig->state.cache.ptt == RIG_PTT_ON)
|
||||
{
|
||||
*freq = RIG_VFO_B? rig->state.cache.freqMainB : rig->state.cache.freqMainA;
|
||||
*freq = RIG_VFO_B ? rig->state.cache.freqMainB : rig->state.cache.freqMainA;
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
@ -999,7 +1003,8 @@ static int ft747_get_update_data(RIG *rig)
|
|||
p = (struct ft747_priv_data *)rig->state.priv;
|
||||
rigport = &rig->state.rigport;
|
||||
|
||||
if (rig->state.cache.ptt == RIG_PTT_ON || !rig_check_cache_timeout(&p->status_tv, FT747_CACHE_TIMEOUT))
|
||||
if (rig->state.cache.ptt == RIG_PTT_ON
|
||||
|| !rig_check_cache_timeout(&p->status_tv, FT747_CACHE_TIMEOUT))
|
||||
{
|
||||
return RIG_OK;
|
||||
}
|
||||
|
|
|
@ -779,6 +779,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
{
|
||||
rig_set_split_vfo(rig, RIG_VFO_A, RIG_VFO_A, RIG_SPLIT_OFF);
|
||||
}
|
||||
|
||||
RETURNFUNC(RIG_OK);
|
||||
} // we don't set freq in this case
|
||||
|
||||
|
@ -10382,7 +10383,7 @@ int newcat_get_cmd(RIG *rig)
|
|||
rig_debug(RIG_DEBUG_WARN, "%s: Rig busy - retrying %d of %d: '%s'\n", __func__,
|
||||
retry_count, state->rigport.retry, priv->cmd_str);
|
||||
// DX3000 was taking 1.6 seconds in certain command sequences
|
||||
hl_usleep(600*1000); // 600ms wait should cover most cases hopefully
|
||||
hl_usleep(600 * 1000); // 600ms wait should cover most cases hopefully
|
||||
|
||||
rc = -RIG_ERJCTED; /* retry */
|
||||
break;
|
||||
|
|
|
@ -148,7 +148,8 @@ again:
|
|||
buf[4] = 0x03; n = write(fd, buf, 5);
|
||||
break;
|
||||
|
||||
case 0xbb: buf[0] = buf[1] = 0;printf("READ EPROM\n"); n = write(fd, buf, 2);break;
|
||||
case 0xbb: buf[0] = buf[1] = 0; printf("READ EPROM\n"); n = write(fd, buf, 2);
|
||||
break;
|
||||
|
||||
default: printf("Unknown cmd=%02x\n", buf[4]);
|
||||
}
|
||||
|
|
|
@ -296,13 +296,13 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
SNPRINTF(buf, sizeof(buf), "DA%d;", datamode);
|
||||
n = write(fd, buf, strlen(buf));
|
||||
printf("%s\n",buf);
|
||||
printf("%s\n", buf);
|
||||
continue;
|
||||
}
|
||||
else if (strncmp(buf, "DA", 2) == 0)
|
||||
{
|
||||
sscanf(buf, "DA%d", &datamode);
|
||||
printf("%s\n",buf);
|
||||
printf("%s\n", buf);
|
||||
continue;
|
||||
}
|
||||
else if (strncmp(buf, "BD;", 3) == 0)
|
||||
|
|
|
@ -296,7 +296,8 @@ int dumpcaps(RIG *rig, FILE *fout)
|
|||
const struct icom_priv_caps *priv_caps =
|
||||
(const struct icom_priv_caps *) rig->caps->priv;
|
||||
|
||||
if (priv_caps && RIG_BACKEND_NUM(rig->caps->rig_model) == RIG_ICOM && priv_caps->agc_levels_present)
|
||||
if (priv_caps && RIG_BACKEND_NUM(rig->caps->rig_model) == RIG_ICOM
|
||||
&& priv_caps->agc_levels_present)
|
||||
{
|
||||
for (i = 0; i <= RIG_AGC_LAST && priv_caps->agc_levels[i].level != RIG_AGC_LAST
|
||||
&& priv_caps->agc_levels[i].icom_level >= 0; i++)
|
||||
|
|
|
@ -736,7 +736,8 @@ void usage(void)
|
|||
usage_rig(stdout);
|
||||
|
||||
printf("\nError codes and messages\n");
|
||||
for(enum rig_errcode_e e = 0; e<RIG_EEND; ++e)
|
||||
|
||||
for (enum rig_errcode_e e = 0; e < RIG_EEND; ++e)
|
||||
{
|
||||
printf("-%d - %s", e, rigerror2(e));
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue