Various Yaesu updates

Fix typo in ft990.c
Remove unused var in newcat.c
Make rit and xit use labs() to match data type
Fix frequency print in newcat.c to use PRIll

RRR
Mike W9MDB
libusb-1-0
Michael Black 2016-02-06 00:48:54 -06:00 zatwierdzone przez Nate Bargmann
rodzic 04c545b9b9
commit e1f0433620
2 zmienionych plików z 10 dodań i 10 usunięć

Wyświetl plik

@ -137,7 +137,7 @@ const struct rig_caps ft990_caps = {
.rig_model = RIG_MODEL_FT990,
.model_name = "FT-990",
.mfg_name = "Yaesu",
.version = "0.2.1",
.version = "0.2.2",
.copyright = "LGPL",
.status = RIG_STATUS_ALPHA,
.rig_type = RIG_TYPE_TRANSCEIVER,
@ -942,7 +942,7 @@ int ft990_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
err = ft990_send_static_cmd(rig, ci);
if (err != RIG_OK);
if (err != RIG_OK)
return err;
return RIG_OK;
}

Wyświetl plik

@ -48,7 +48,7 @@
/* global variables */
static const char cat_term = ';'; /* Yaesu command terminator */
static const char cat_unknown_cmd[] = "?;"; /* Yaesu ? */
// static const char cat_unknown_cmd[] = "?;"; /* Yaesu ? */
/* Internal Backup and Restore VFO Memory Channels */
#define NC_MEM_CHANNEL_NONE 2012
@ -441,7 +441,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq) {
int width_frequency = priv->width_frequency;
if (width_frequency == 0) width_frequency = 8; // default to 8
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*lld%c", c, width_frequency, (long long)freq, cat_term);
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "F%c%0*"PRIll"%c", c, width_frequency, (int64_t)freq, cat_term);
rig_debug(RIG_DEBUG_TRACE, "%s:%d cmd_str = %s\n", __func__, __LINE__, priv->cmd_str);
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
@ -1166,15 +1166,15 @@ int newcat_set_rit(RIG * rig, vfo_t vfo, shortfreq_t rit)
if (rit > rig->caps->max_rit)
rit = rig->caps->max_rit; /* + */
else if (abs(rit) > rig->caps->max_rit)
else if (labs(rit) > rig->caps->max_rit)
rit = - rig->caps->max_rit; /* - */
if (rit == 0)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRT0%c", cat_term, cat_term);
else if (rit < 0)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRD%04d%cRT1%c", cat_term, abs(rit), cat_term, cat_term);
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRD%04ld%cRT1%c", cat_term, labs(rit), cat_term, cat_term);
else
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRU%04d%cRT1%c", cat_term, abs(rit), cat_term, cat_term);
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRU%04ld%cRT1%c", cat_term, labs(rit), cat_term, cat_term);
return newcat_set_cmd(rig);
}
@ -1229,15 +1229,15 @@ int newcat_set_xit(RIG * rig, vfo_t vfo, shortfreq_t xit)
if (xit > rig->caps->max_xit)
xit = rig->caps->max_xit; /* + */
else if (abs(xit) > rig->caps->max_xit)
else if (labs(xit) > rig->caps->max_xit)
xit = - rig->caps->max_xit; /* - */
if (xit == 0)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cXT0%c", cat_term, cat_term);
else if (xit < 0)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRD%04d%cXT1%c", cat_term, abs(xit), cat_term, cat_term);
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRD%04ld%cXT1%c", cat_term, labs(xit), cat_term, cat_term);
else
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRU%04d%cXT1%c", cat_term, abs(xit), cat_term, cat_term);
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "RC%cRU%04ld%cXT1%c", cat_term, labs(xit), cat_term, cat_term);
return newcat_set_cmd(rig);
}