pull/224/head
Michael Black 2020-03-26 11:11:46 -05:00
rodzic 0c8130db00
commit 8fd5e16363
11 zmienionych plików z 47 dodań i 23 usunięć

Wyświetl plik

@ -2636,7 +2636,8 @@ adat_priv_data_ptr adat_new_priv_data(RIG *pRig)
{ {
// Init Priv Data // Init Priv Data
pPriv = pRig->state.priv = (adat_priv_data_ptr) calloc(sizeof(adat_priv_data_t), 1); pPriv = pRig->state.priv = (adat_priv_data_ptr) calloc(sizeof(adat_priv_data_t),
1);
if (pRig->state.priv != NULL) if (pRig->state.priv != NULL)
{ {

Wyświetl plik

@ -983,7 +983,8 @@ int elad_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
case RIG_VFO_MEM: vfo_function = '2'; break; case RIG_VFO_MEM: vfo_function = '2'; break;
default: default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__, rig_strvfo(txvfo)); rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__,
rig_strvfo(txvfo));
return -RIG_EINVAL; return -RIG_EINVAL;
} }
@ -1964,6 +1965,7 @@ int elad_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
else else
{ {
int foundit = 0; int foundit = 0;
for (i = 0; i < MAXDBLSTSIZ && rig->state.preamp[i]; i++) for (i = 0; i < MAXDBLSTSIZ && rig->state.preamp[i]; i++)
{ {
if (val.i == rig->state.preamp[i]) if (val.i == rig->state.preamp[i])

Wyświetl plik

@ -241,6 +241,7 @@ int icom_one_transaction(RIG *rig, int cmd, int subcmd,
// And try again // And try again
frm_len = read_icom_frame(&rs->rigport, buf, sizeof(buf)); frm_len = read_icom_frame(&rs->rigport, buf, sizeof(buf));
} }
// cppcheck-suppress * // cppcheck-suppress *
Unhold_Decode(rig); Unhold_Decode(rig);

Wyświetl plik

@ -224,7 +224,9 @@ int ic10_get_vfo(RIG *rig, vfo_t *vfo)
__func__, c); __func__, c);
return -RIG_EPROTO; return -RIG_EPROTO;
} }
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning VFO=%s\n", __func__, rig_strvfo(*vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning VFO=%s\n", __func__,
rig_strvfo(*vfo));
return RIG_OK; return RIG_OK;
} }
@ -415,7 +417,7 @@ int ic10_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
case RIG_VFO_A: case RIG_VFO_A:
case RIG_VFO_MAIN: vfo_letter = 'A'; break; case RIG_VFO_MAIN: vfo_letter = 'A'; break;
case RIG_VFO_B: case RIG_VFO_B:
case RIG_VFO_SUB: vfo_letter = 'B'; break; case RIG_VFO_SUB: vfo_letter = 'B'; break;
default: default:
@ -522,6 +524,7 @@ int ic10_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
unsigned char ptt_letter; unsigned char ptt_letter;
rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__); rig_debug(RIG_DEBUG_VERBOSE, "%s: called\n", __func__);
switch (ptt) switch (ptt)
{ {
case RIG_PTT_OFF: ptt_letter = 'R'; break; case RIG_PTT_OFF: ptt_letter = 'R'; break;

Wyświetl plik

@ -236,6 +236,7 @@ static int ts870s_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (RIG_MODE_USB == mode || RIG_MODE_LSB == mode || RIG_MODE_AM == mode) if (RIG_MODE_USB == mode || RIG_MODE_LSB == mode || RIG_MODE_AM == mode)
{ {
pbwidth_t mode_default_hpf; pbwidth_t mode_default_hpf;
/* we assume the HPF is set to default and set the LPF to /* we assume the HPF is set to default and set the LPF to
give the best approximaation of the requested width */ give the best approximaation of the requested width */
if (RIG_MODE_AM == mode) if (RIG_MODE_AM == mode)

Wyświetl plik

@ -793,7 +793,7 @@ static int ft857_get_pometer_level(RIG *rig, value_t *val)
/* Valid only if PTT is on */ /* Valid only if PTT is on */
if ((p->tx_status & 0x80) == 0) if ((p->tx_status & 0x80) == 0)
{ {
rig_debug(RIG_DEBUG_TRACE,"%s: bars=%d\n", __func__, p->tx_status & 0x0F); rig_debug(RIG_DEBUG_TRACE, "%s: bars=%d\n", __func__, p->tx_status & 0x0F);
// does rig have 10 bars or 15? // does rig have 10 bars or 15?
val->i = (p->tx_status & 0x0F) / 10.0; val->i = (p->tx_status & 0x0F) / 10.0;
} }

Wyświetl plik

@ -1546,7 +1546,8 @@ int newcat_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
*split = RIG_SPLIT_OFF; *split = RIG_SPLIT_OFF;
} }
rig_debug(RIG_DEBUG_TRACE, "SPLIT = %d, vfo = %s, TX_vfo = %s\n", *split, rig_strvfo(vfo), rig_debug(RIG_DEBUG_TRACE, "SPLIT = %d, vfo = %s, TX_vfo = %s\n", *split,
rig_strvfo(vfo),
rig_strvfo(*tx_vfo)); rig_strvfo(*tx_vfo));
return RIG_OK; return RIG_OK;
@ -6005,7 +6006,8 @@ int newcat_get_rigid(RIG *rig)
} }
} }
rig_debug(RIG_DEBUG_TRACE, "rig_id = %d, *s = %s\n", priv->rig_id, s==NULL?"NULL":s); rig_debug(RIG_DEBUG_TRACE, "rig_id = %d, *s = %s\n", priv->rig_id,
s == NULL ? "NULL" : s);
return priv->rig_id; return priv->rig_id;
} }
@ -6070,7 +6072,8 @@ int newcat_get_vfo_mode(RIG *rig, vfo_t *vfo_mode)
*vfo_mode = RIG_VFO_MEM; *vfo_mode = RIG_VFO_MEM;
} }
rig_debug(RIG_DEBUG_TRACE, "%s: vfo mode = %s\n", __func__, rig_strrmode(*vfo_mode)); rig_debug(RIG_DEBUG_TRACE, "%s: vfo mode = %s\n", __func__,
rig_strrmode(*vfo_mode));
return err; return err;
} }

Wyświetl plik

@ -510,7 +510,7 @@ const char *HAMLIB_API rig_strvfo(vfo_t vfo)
{ {
if (vfo == vfo_str[i].vfo) if (vfo == vfo_str[i].vfo)
{ {
rig_debug(RIG_DEBUG_TRACE, "%s returning %s\n", __func__, vfo_str[i].str); rig_debug(RIG_DEBUG_TRACE, "%s returning %s\n", __func__, vfo_str[i].str);
return vfo_str[i].str; return vfo_str[i].str;
} }
} }

Wyświetl plik

@ -456,6 +456,7 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
rs->vfo_list |= caps->tx_range_list1[i].vfo; rs->vfo_list |= caps->tx_range_list1[i].vfo;
rs->mode_list |= caps->tx_range_list1[i].modes; rs->mode_list |= caps->tx_range_list1[i].modes;
} }
for (i = 0; i < FRQRANGESIZ && !RIG_IS_FRNG_END(caps->rx_range_list2[i]); i++) for (i = 0; i < FRQRANGESIZ && !RIG_IS_FRNG_END(caps->rx_range_list2[i]); i++)
{ {
rs->vfo_list |= caps->rx_range_list2[i].vfo; rs->vfo_list |= caps->rx_range_list2[i].vfo;
@ -1840,6 +1841,7 @@ int HAMLIB_API rig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
else else
{ {
vfo_t curr_vfo; vfo_t curr_vfo;
if (!caps->set_vfo) if (!caps->set_vfo)
{ {
return -RIG_ENTARGET; return -RIG_ENTARGET;

Wyświetl plik

@ -900,23 +900,33 @@ void range_print(FILE *fout, const struct freq_range_list range_list[], int rx)
char *label_hi = "W"; char *label_hi = "W";
double low = range_list[i].low_power / 1000.0f; double low = range_list[i].low_power / 1000.0f;
double hi = range_list[i].high_power / 1000.0f; double hi = range_list[i].high_power / 1000.0f;
if (low < 0) {
label_lo = "mW"; if (low < 0)
low *= 1000; {
label_lo = "mW";
low *= 1000;
} }
if (low < 0) {
label_lo = "uW"; if (low < 0)
low *= 1000; {
label_lo = "uW";
low *= 1000;
} }
if (hi < 0) {
label_hi = "mW"; if (hi < 0)
hi *= 1000; {
label_hi = "mW";
hi *= 1000;
} }
if (hi < 0) {
label_hi = "uW"; if (hi < 0)
hi *= 1000; {
label_hi = "uW";
hi *= 1000;
} }
fprintf(fout, "\t\tLow power: %g %s, High power: %g %s\n", low, label_lo, hi, label_hi);
fprintf(fout, "\t\tLow power: %g %s, High power: %g %s\n", low, label_lo, hi,
label_hi);
} }
} }
} }

Wyświetl plik

@ -716,7 +716,8 @@ static int handle_ts2000(void *arg)
int retval = rig_get_freq(my_rig, RIG_VFO_A, &freq); int retval = rig_get_freq(my_rig, RIG_VFO_A, &freq);
char response[64]; char response[64];
// cppcheck-suppress * // cppcheck-suppress *
char *fmt = "IF%011"PRIll"%04d+%05d%1d%1d%1d%02d%1d%1"PRIll"%1d%1d%1d%1d%02d%1d;"; char *fmt =
"IF%011"PRIll"%04d+%05d%1d%1d%1d%02d%1d%1"PRIll"%1d%1d%1d%1d%02d%1d;";
if (retval != RIG_OK) if (retval != RIG_OK)
{ {