Change all __FUNCTION__ to __func__

pull/149/head
Michael Black 2019-11-30 10:16:28 -06:00
rodzic 2f4d62709e
commit 72087f1b10
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
67 zmienionych plików z 815 dodań i 815 usunięć

Wyświetl plik

@ -315,7 +315,7 @@ int format8k_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width)
default:
rig_debug(RIG_DEBUG_ERR,
"%s: unsupported passband %s %d\n",
__FUNCTION__,
__func__,
rig_strrmode(mode), (int)width);
return -RIG_EINVAL;
}
@ -341,7 +341,7 @@ int format8k_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width)
default:
rig_debug(RIG_DEBUG_ERR,
"%s: unsupported passband %s %d\n",
__FUNCTION__,
__func__,
rig_strrmode(mode), (int)width);
return -RIG_EINVAL;
}
@ -349,7 +349,7 @@ int format8k_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%s'\n",
__FUNCTION__, rig_strrmode(mode));
__func__, rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -425,7 +425,7 @@ int parse8k_aor_mode(RIG *rig, char aormode, char aorwidth, rmode_t *mode, pbwid
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%c'\n",
__FUNCTION__, aormode);
__func__, aormode);
return -RIG_EINVAL;
}
if (*width == RIG_PASSBAND_NORMAL)
@ -458,7 +458,7 @@ int aor_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
mdp = strstr(ackbuf, "MD");
if (!mdp) {
rig_debug(RIG_DEBUG_ERR, "%s: no MD in returned string: '%s'\n",
__FUNCTION__, ackbuf);
__func__, ackbuf);
return -RIG_EPROTO;
}
@ -570,7 +570,7 @@ int aor_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
lvl_len = sprintf(lvlbuf, "AC" EOM);
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported %s %d\n", __FUNCTION__, (int)level);
rig_debug(RIG_DEBUG_ERR,"Unsupported %s %d\n", __func__, (int)level);
return -RIG_EINVAL;
}
@ -613,7 +613,7 @@ int aor_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
if (att > MAXDBLSTSIZ || rs->attenuator[att-1]==0) {
rig_debug(RIG_DEBUG_ERR,"Unsupported att %s %d\n",
__FUNCTION__, att);
__func__, att);
return -RIG_EPROTO;
}
val->i = rs->attenuator[att-1];
@ -651,7 +651,7 @@ int aor_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
default:
rig_debug(RIG_DEBUG_ERR,"Unsupported %s %d\n", __FUNCTION__, (int)level);
rig_debug(RIG_DEBUG_ERR,"Unsupported %s %d\n", __func__, (int)level);
return -RIG_EINVAL;
}
@ -870,7 +870,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
int ch_save = chan->channel_num;
rig_debug(RIG_DEBUG_WARN, "%s: skipping, channel is empty: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
memset(chan, 0, sizeof(channel_t));
chan->vfo = vfo_save;
@ -884,7 +884,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "MX");
if (!tagp) {
rig_debug(RIG_DEBUG_WARN, "%s: no MX in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}
@ -897,7 +897,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "MP");
if (!tagp) {
rig_debug(RIG_DEBUG_WARN, "%s: no MP in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}
@ -909,7 +909,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "RF");
if (!tagp) {
rig_debug(RIG_DEBUG_WARN, "%s: no RF in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}
@ -921,7 +921,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "ST");
if (!tagp) {
rig_debug(RIG_DEBUG_WARN, "%s: no ST in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}
ts = chan->tuning_step;
@ -935,7 +935,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "MD");
if (!tagp && mem_caps->mode && mem_caps->width) {
rig_debug(RIG_DEBUG_WARN, "%s: no MD in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}
/* "BW" only on AR5000 */
@ -953,7 +953,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "AU");
if (!tagp) {
rig_debug(RIG_DEBUG_WARN, "%s: no AU in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}
@ -966,7 +966,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "AT");
if (!tagp) {
rig_debug(RIG_DEBUG_WARN, "%s: no AT in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}
@ -982,7 +982,7 @@ static int parse_chan_line(RIG *rig, channel_t *chan, char *basep, const channel
tagp = strstr(basep, "TM");
if (!tagp) {
rig_debug(RIG_DEBUG_WARN, "%s: no TM in returned string: '%s'\n",
__FUNCTION__, basep);
__func__, basep);
return -RIG_EPROTO;
}

Wyświetl plik

@ -218,7 +218,7 @@ int format2700_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width)
case RIG_MODE_FM: aormode = AR2700_NFM; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode %s\n",
__FUNCTION__, rig_strrmode(mode));
__func__, rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -235,7 +235,7 @@ int parse2700_aor_mode(RIG *rig, char aormode, char aorwidth, rmode_t *mode, pbw
case AR2700_AM: *mode = RIG_MODE_AM; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%c'\n",
__FUNCTION__, aormode);
__func__, aormode);
return -RIG_EPROTO;
}

Wyświetl plik

@ -421,7 +421,7 @@ int ar3030_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode %s\n",
__FUNCTION__,rig_strrmode(mode));
__func__,rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -482,7 +482,7 @@ int ar3030_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%c'\n",
__FUNCTION__,buf[25]);
__func__,buf[25]);
return -RIG_EPROTO;
}
@ -681,7 +681,7 @@ int ar3030_get_channel(RIG *rig, channel_t *chan)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%c'\n",
__FUNCTION__,infobuf[22]);
__func__,infobuf[22]);
return -RIG_EPROTO;
}

Wyświetl plik

@ -410,7 +410,7 @@ int format5k_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width)
case RIG_MODE_SAH: aormode = AR5K_SAH; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode %s\n",
__FUNCTION__, rig_strrmode(mode));
__func__, rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -428,7 +428,7 @@ int format5k_mode(RIG *rig, char *buf, rmode_t mode, pbwidth_t width)
case s_kHz(220): aorwidth = '6'; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported width %d\n",
__FUNCTION__, (int)width);
__func__, (int)width);
return -RIG_EINVAL;
}
@ -454,7 +454,7 @@ int parse5k_aor_mode(RIG *rig, char aormode, char aorwidth, rmode_t *mode, pbwid
case AR5K_SAH: *mode = RIG_MODE_SAH; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%c'\n",
__FUNCTION__, aormode);
__func__, aormode);
return -RIG_EPROTO;
}
@ -468,7 +468,7 @@ int parse5k_aor_mode(RIG *rig, char aormode, char aorwidth, rmode_t *mode, pbwid
case '6': *width = s_kHz(220); break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported width %d\n",
__FUNCTION__, aorwidth);
__func__, aorwidth);
return -RIG_EPROTO;
}

Wyświetl plik

@ -329,7 +329,7 @@ static int ar7030p_cleanup( RIG *rig )
assert( NULL != rig );
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
for ( i = 0; i < NB_CHAN; i++ )
{

Wyświetl plik

@ -325,13 +325,13 @@ int sr2200_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (freq < sr2200_caps.rx_range_list1[0].startf) {
rig_debug(RIG_DEBUG_WARN, "Error in %s: frequency is lower than minimum supported value (%.0f Hz)\n",
__FUNCTION__, sr2200_caps.rx_range_list1[0].startf);
__func__, sr2200_caps.rx_range_list1[0].startf);
return -RIG_EPROTO;
}
if (freq > sr2200_caps.rx_range_list1[0].endf) {
rig_debug(RIG_DEBUG_WARN, "Error in %s: frequency is higher than maximum supported value (%.0f Hz)\n",
__FUNCTION__, sr2200_caps.rx_range_list1[0].endf);
__func__, sr2200_caps.rx_range_list1[0].endf);
return -RIG_EPROTO;
}
@ -348,7 +348,7 @@ int sr2200_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
rfp = strstr(ackbuf, "RF");
if (!rfp) {
rig_debug(RIG_DEBUG_WARN, "NO RF in returned string in %s: '%s'\n",
__FUNCTION__, freqbuf);
__func__, freqbuf);
return -RIG_EPROTO;
}
@ -387,7 +387,7 @@ int sr2200_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode %s\n",
__FUNCTION__,rig_strrmode(mode));
__func__,rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -413,7 +413,7 @@ int sr2200_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
mdp = strstr(ackbuf, "MD");
if (!mdp) {
rig_debug(RIG_DEBUG_ERR, "%s: no MD in returned string: '%s'\n",
__FUNCTION__, ackbuf);
__func__, ackbuf);
return -RIG_EPROTO;
}
@ -432,7 +432,7 @@ int parse_s2200_aor_mode(RIG *rig, char aormode, char aorwidth, rmode_t *mode, p
case SR2200_WFM: *mode = RIG_MODE_WFM; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode '%c'\n",
__FUNCTION__, aormode);
__func__, aormode);
return -RIG_EPROTO;
}
@ -444,7 +444,7 @@ int parse_s2200_aor_mode(RIG *rig, char aormode, char aorwidth, rmode_t *mode, p
case SR2200_WFM: *width = s_kHz(300); break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported width %d\n",
__FUNCTION__, aorwidth);
__func__, aorwidth);
return -RIG_EPROTO;
}
@ -609,7 +609,7 @@ int sr2200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
lvl_len = sprintf(lvlbuf, "AM" EOM);
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported level %s\n", __FUNCTION__, rig_strlevel(level));
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported level %s\n", __func__, rig_strlevel(level));
return -RIG_EINVAL;
}
@ -640,7 +640,7 @@ int sr2200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
if (att > MAXDBLSTSIZ || rs->attenuator[att-1]==0) {
rig_debug(RIG_DEBUG_ERR,"Unsupported att %s %d\n",
__FUNCTION__, att);
__func__, att);
return -RIG_EPROTO;
}
val->i = rs->attenuator[att-1];
@ -682,7 +682,7 @@ int sr2200_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported level %s\n", __FUNCTION__, rig_strlevel(level));
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported level %s\n", __func__, rig_strlevel(level));
return -RIG_EINVAL;
}

Wyświetl plik

@ -221,7 +221,7 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
char cmd_buf[MAXCMDLEN];
int retval, cmd_len;
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __FUNCTION__, cmd);
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __func__, cmd);
struct rig_state *rs = &rig->state;
struct barrett_priv_data *priv = rig->state.priv;
@ -238,7 +238,7 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
// response format is 0x11,data...,0x0d,0x0a,0x13
retval = read_string(&rs->rigport, priv->ret_data, sizeof(priv->ret_data),
"\x11", 1);
rig_debug(RIG_DEBUG_VERBOSE, "%s: resultlen=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: resultlen=%d\n", __func__,
(int)strlen(priv->ret_data));
if (retval < 0) {
@ -252,22 +252,22 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
}
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: retval=%d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_VERBOSE, "%s: retval=%d\n", __func__, retval);
dump_hex((const unsigned char *)priv->ret_data, strlen(priv->ret_data));
char *p = priv->ret_data;
char xon = p[0];
char xoff = p[strlen(p) - 1];
if (xon == 0x13 && xoff == 0x11) {
rig_debug(RIG_DEBUG_ERR, "%s: removing xoff char\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: removing xoff char\n", __func__);
p[strlen(p) - 1] = 0;
} else {
rig_debug(RIG_DEBUG_ERR,
"%s: expected XOFF=0x13 as first and XON=0x11 as last byte, got %02x/%02x\n",
__FUNCTION__, xon, xoff);
__func__, xon, xoff);
}
rig_debug(RIG_DEBUG_ERR, "%s: removing xon char\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: removing xon char\n", __func__);
// Remove the XON char if there
p = memchr(priv->ret_data, 0x11, strlen(priv->ret_data));
@ -276,7 +276,7 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
}
if (result != NULL) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: setting result\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: setting result\n", __func__);
if (priv->ret_data[0] == 0x13) { // we'll return from the 1st good char
*result = &(priv->ret_data[1]);
@ -300,10 +300,10 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
}
dump_hex((const unsigned char *)*result, strlen(*result));
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning result=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning result=%s\n", __func__,
*result);
} else {
rig_debug(RIG_DEBUG_VERBOSE, "%s: no result requested\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: no result requested\n", __func__);
}
return RIG_OK;
@ -313,7 +313,7 @@ int barrett_transaction(RIG *rig, char *cmd, int expected, char **result)
int barrett_init(RIG *rig)
{
struct barrett_priv_data *priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s version %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s version %s\n", __func__,
rig->caps->version);
if (!rig || !rig->caps) {
@ -364,7 +364,7 @@ int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
int retval;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
*freq = 0;
char *response = NULL;
@ -376,7 +376,7 @@ int barrett_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
}
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: invalid response=%s\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: invalid response=%s\n", __func__, response);
return retval;
}
@ -401,7 +401,7 @@ int barrett_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
int retval;
struct barrett_priv_data *priv = rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%.0f\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%.0f\n", __func__,
rig_strvfo(vfo), freq);
// If we are not explicity asking for VFO_B then we'll set the receive side also
@ -417,7 +417,7 @@ int barrett_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
//dump_hex((unsigned char *)response, strlen(response));
if (strncmp(response, "OK", 2) != 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __func__, response);
return -RIG_EINVAL;
}
}
@ -434,7 +434,7 @@ int barrett_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
if (strncmp(response, "OK", 2) != 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __func__, response);
return -RIG_EINVAL;
}
}
@ -452,7 +452,7 @@ int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
int retval;
char cmd_buf[MAXCMDLEN];
rig_debug(RIG_DEBUG_VERBOSE, "%s: ptt=%d\n", __FUNCTION__, ptt);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ptt=%d\n", __func__, ptt);
// we need a little extra time before we assert PTT
// testing with rigctld worked, but from WSJT-X did not
@ -463,16 +463,16 @@ int barrett_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
retval = barrett_transaction(rig, cmd_buf, 0, &response);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: invalid response=%s\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: invalid response=%s\n", __func__, response);
return retval;
}
if (strncmp(response, "OK", 2) != 0) {
rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: Expected OK, got '%s'\n", __func__, response);
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd:IP result=%s\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd:IP result=%s\n", __func__, response);
return RIG_OK;
}
@ -487,7 +487,7 @@ int barrett_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
int retval;
char *response = NULL;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
retval = barrett_transaction(rig, "IP", 0, &response);
@ -521,7 +521,7 @@ int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
//struct tt588_priv_data *priv = (struct tt588_priv_data *) rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s mode=%s width=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s mode=%s width=%d\n", __func__,
rig_strvfo(vfo), rig_strrmode(mode), (int)width);
switch (mode) {
@ -546,7 +546,7 @@ int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode %s\n", __FUNCTION__, rig_strrmode(mode));
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode %s\n", __func__, rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -569,13 +569,13 @@ int barrett_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
*/
int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
char *result = NULL;
int retval = barrett_transaction(rig, "IB", 0, &result);
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: bad response=%s\n", __FUNCTION__, result);
rig_debug(RIG_DEBUG_ERR, "%s: bad response=%s\n", __func__, result);
return retval;
}
@ -602,13 +602,13 @@ int barrett_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode='%c%c'\n", __FUNCTION__, result[0],
rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode='%c%c'\n", __func__, result[0],
result[1]);
return -RIG_EPROTO;
}
*width = 3000; // we'll default this to 3000 for now
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s mode=%s width=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s mode=%s width=%d\n", __func__,
rig_strvfo(vfo), rig_strrmode(*mode), (int)*width);
return RIG_OK;
@ -621,12 +621,12 @@ int barrett_get_vfo(RIG *rig, vfo_t *vfo)
*vfo = RIG_VFO_A;
if (check_vfo(*vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n", __func__,
rig_strvfo(*vfo));
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__, rig_strvfo(*vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(*vfo));
return RIG_OK;
}
@ -641,7 +641,7 @@ int barrett_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
// The 2050 only has one RX and one TX VFO -- it's not treated as VFOA/VFOB
char cmd_buf[MAXCMDLEN];
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%g\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%g\n", __func__,
rig_strvfo(vfo), tx_freq);
sprintf((char *) cmd_buf, "TT%08.0f" EOM, tx_freq);
@ -663,7 +663,7 @@ int barrett_set_split_vfo(RIG *rig, vfo_t rxvfo, split_t split, vfo_t txvfo)
priv = rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called rxvfo=%s, txvfo=%s, split=%d\n",
__FUNCTION__, rig_strvfo(rxvfo), rig_strvfo(txvfo), split);
__func__, rig_strvfo(rxvfo), rig_strvfo(txvfo), split);
priv->split = split;
return RIG_OK;
@ -679,7 +679,7 @@ int barrett_get_split_vfo(RIG *rig, vfo_t rxvfo, split_t *split, vfo_t *txvfo)
*split = priv->split;
*txvfo = RIG_VFO_B; // constant
rig_debug(RIG_DEBUG_VERBOSE, "%s called rxvfo=%s, txvfo=%s, split=%d\n",
__FUNCTION__, rig_strvfo(rxvfo), rig_strvfo(*txvfo), *split);
__func__, rig_strvfo(rxvfo), rig_strvfo(*txvfo), *split);
return RIG_OK;
}
@ -698,7 +698,7 @@ int barrett_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
retval = barrett_transaction(rig, "IAL", 0, &response);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR, "%s: invalid response=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: invalid response=%s\n", __func__,
response);
return retval;
}
@ -710,18 +710,18 @@ int barrett_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
val->i = strength;
} else {
rig_debug(RIG_DEBUG_ERR, "%s: unable to parse STRENGHT from %s\n",
__FUNCTION__, response);
__func__, response);
return -RIG_EPROTO;
}
break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported level %s\n", __FUNCTION__, rig_strlevel(level));
rig_debug(RIG_DEBUG_ERR, "%s: unsupported level %s\n", __func__, rig_strlevel(level));
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s level=%s val=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s level=%s val=%s\n", __func__,
rig_strvfo(vfo), rig_strlevel(level), response);
return RIG_OK;
@ -735,12 +735,12 @@ const char * barrett_get_info(RIG *rig)
{
char *response = NULL;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
int retval = barrett_transaction(rig, "IVF", 0, &response);
if (retval == RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: result=%s\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: result=%s\n", __func__, response);
} else {
rig_debug(RIG_DEBUG_VERBOSE, "Software Version %s\n", response);
}

Wyświetl plik

@ -236,7 +236,7 @@ const struct rot_caps nexstar_rot_caps = {
DECLARE_INITROT_BACKEND(celestron)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&nexstar_rot_caps);

Wyświetl plik

@ -113,19 +113,19 @@ static int dummy_amp_reset(AMP *amp, amp_reset_t reset)
switch (reset)
{
case AMP_RESET_MEM:
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset memory\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset memory\n",__func__);
break;
case AMP_RESET_FAULT:
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset fault\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset fault\n",__func__);
break;
case AMP_RESET_AMP:
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset amplifier\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset amplifier\n",__func__);
break;
default:
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset unknown=%d\n",__FUNCTION__, reset);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Reset unknown=%d\n",__func__, reset);
return -RIG_EINVAL;
}
@ -240,28 +240,28 @@ static int dummy_amp_set_powerstat(AMP *amp, powerstat_t status)
switch (status)
{
case RIG_POWER_OFF:
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_OFF\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_OFF\n", __func__);
break;
case RIG_POWER_ON:
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_ON\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_ON\n", __func__);
break;
case RIG_POWER_STANDBY:
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_STANDBY\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_STANDBY\n", __func__);
break;
case RIG_POWER_OPERATE:
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_OPERATE\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_OPERATE\n", __func__);
break;
case RIG_POWER_UNKNOWN:
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_UNKNOWN\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called POWER_UNKNOWN\n", __func__);
break;
default:
rig_debug(RIG_DEBUG_VERBOSE, "%s called invalid power status=%d\n",
__FUNCTION__, status);
__func__, status);
return -RIG_EINVAL;
break;
}
@ -278,7 +278,7 @@ static int dummy_amp_get_powerstat(AMP *amp, powerstat_t *status)
amp->state.priv;
*status = priv->powerstat;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -317,7 +317,7 @@ static int dummy_amp_get_ext_level(AMP *amp, token_t token, value_t *val)
/* load value */
*val = elp->val;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__,
cfp->name);
return RIG_OK;
@ -365,7 +365,7 @@ const struct amp_caps dummy_amp_caps =
DECLARE_INITAMP_BACKEND(dummy)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n",__func__);
amp_register(&dummy_amp_caps);
amp_register(&netampctl_caps);

Wyświetl plik

@ -219,7 +219,7 @@ static int dummy_init(RIG *rig)
rig->state.priv = (void *)priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rig->state.rigport.type.rig = RIG_PORT_NONE;
priv->ptt = RIG_PTT_OFF;
@ -278,7 +278,7 @@ static int dummy_cleanup(RIG *rig)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
int i;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
for (i = 0; i < NB_CHAN; i++)
{
@ -302,14 +302,14 @@ static int dummy_cleanup(RIG *rig)
static int dummy_open(RIG *rig)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
static int dummy_close(RIG *rig)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -368,7 +368,7 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
char fstr[20];
sprintf_freq(fstr, freq);
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__,
rig_strvfo(vfo), fstr);
curr->freq = freq;
@ -381,7 +381,7 @@ static int dummy_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo));
*freq = curr->freq;
return RIG_OK;
}
@ -394,7 +394,7 @@ static int dummy_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
char buf[16];
sprintf_freq(buf, width);
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s %s\n", __func__,
rig_strvfo(vfo), rig_strrmode(mode), buf);
curr->mode = mode;
@ -419,7 +419,7 @@ static int dummy_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo));
*mode = curr->mode;
*width = curr->width;
@ -433,7 +433,7 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo));
priv->last_vfo = priv->curr_vfo;
priv->curr_vfo = vfo;
@ -463,7 +463,7 @@ static int dummy_set_vfo(RIG *rig, vfo_t vfo)
break;
default:
rig_debug(RIG_DEBUG_VERBOSE, "%s unknown vfo: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s unknown vfo: %s\n", __func__,
rig_strvfo(vfo));
}
@ -476,7 +476,7 @@ static int dummy_get_vfo(RIG *rig, vfo_t *vfo)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
*vfo = priv->curr_vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, rig_strvfo(*vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(*vfo));
return RIG_OK;
}
@ -486,7 +486,7 @@ static int dummy_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
{
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
priv->ptt = ptt;
return RIG_OK;
@ -499,7 +499,7 @@ static int dummy_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
int status = 0;
ptt_t par_status = RIG_PTT_OFF;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
*ptt = priv->ptt;
// sneak a look at the hardware PTT and OR that in with our result
@ -527,7 +527,7 @@ static int dummy_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
{
static int twiddle = 0;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
*dcd = twiddle++ & 1 ? RIG_DCD_ON : RIG_DCD_OFF;
return RIG_OK;
@ -539,7 +539,7 @@ static int dummy_set_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t rptr_shift)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->rptr_shift = rptr_shift;
return RIG_OK;
@ -552,7 +552,7 @@ static int dummy_get_rptr_shift(RIG *rig, vfo_t vfo, rptr_shift_t *rptr_shift)
channel_t *curr = priv->curr;
*rptr_shift = curr->rptr_shift;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -563,7 +563,7 @@ static int dummy_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->rptr_offs = rptr_offs;
return RIG_OK;
@ -576,7 +576,7 @@ static int dummy_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
channel_t *curr = priv->curr;
*rptr_offs = curr->rptr_offs;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -587,7 +587,7 @@ static int dummy_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->ctcss_tone = tone;
return RIG_OK;
@ -600,7 +600,7 @@ static int dummy_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
channel_t *curr = priv->curr;
*tone = curr->ctcss_tone;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -611,7 +611,7 @@ static int dummy_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->dcs_code = code;
return RIG_OK;
@ -624,7 +624,7 @@ static int dummy_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
channel_t *curr = priv->curr;
*code = curr->dcs_code;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -635,7 +635,7 @@ static int dummy_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->ctcss_sql = tone;
return RIG_OK;
@ -648,7 +648,7 @@ static int dummy_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
channel_t *curr = priv->curr;
*tone = curr->ctcss_sql;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -659,7 +659,7 @@ static int dummy_set_dcs_sql(RIG *rig, vfo_t vfo, unsigned int code)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->dcs_sql = code;
return RIG_OK;
@ -672,7 +672,7 @@ static int dummy_get_dcs_sql(RIG *rig, vfo_t vfo, unsigned int *code)
channel_t *curr = priv->curr;
*code = curr->dcs_sql;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -685,7 +685,7 @@ static int dummy_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
char fstr[20];
sprintf_freq(fstr, tx_freq);
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__,
rig_strvfo(vfo), fstr);
curr->tx_freq = tx_freq;
@ -698,7 +698,7 @@ static int dummy_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo));
*tx_freq = curr->tx_freq;
@ -713,7 +713,7 @@ static int dummy_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
char buf[16];
sprintf_freq(buf, tx_width);
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s %s\n", __func__,
rig_strvfo(vfo), rig_strrmode(tx_mode), buf);
curr->tx_mode = tx_mode;
@ -731,7 +731,7 @@ static int dummy_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, rig_strvfo(vfo));
*tx_mode = curr->tx_mode;
*tx_width = curr->tx_width;
@ -745,7 +745,7 @@ static int dummy_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called split=%d, vfo=%s, tx_vfo=%s\n",
__FUNCTION__, split, rig_strvfo(vfo), rig_strvfo(tx_vfo));
__func__, split, rig_strvfo(vfo), rig_strvfo(tx_vfo));
curr->split = split;
priv->tx_vfo = tx_vfo;
@ -762,7 +762,7 @@ static int dummy_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split,
channel_t *curr = priv->curr;
*split = curr->split;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -772,7 +772,7 @@ static int dummy_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->rit = rit;
return RIG_OK;
@ -785,7 +785,7 @@ static int dummy_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
channel_t *curr = priv->curr;
*rit = curr->rit;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -796,7 +796,7 @@ static int dummy_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->xit = xit;
return RIG_OK;
@ -809,7 +809,7 @@ static int dummy_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
channel_t *curr = priv->curr;
*xit = curr->xit;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -820,7 +820,7 @@ static int dummy_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
curr->tuning_step = ts;
return RIG_OK;
@ -833,7 +833,7 @@ static int dummy_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
channel_t *curr = priv->curr;
*ts = curr->tuning_step;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -844,7 +844,7 @@ static int dummy_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __func__,
rig_strfunc(func), status);
if (status)
@ -867,7 +867,7 @@ static int dummy_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
*status = curr->funcs & func ? 1 : 0;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__,
rig_strfunc(func));
return RIG_OK;
@ -899,7 +899,7 @@ static int dummy_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
sprintf(lstr, "%d", val.i);
}
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__,
rig_strlevel(level), lstr);
return RIG_OK;
@ -1006,7 +1006,7 @@ static int dummy_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
}
*val = curr->levels[idx];
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__,
rig_strlevel(level));
return RIG_OK;
@ -1075,7 +1075,7 @@ static int dummy_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
/* store value */
elp->val = val;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__,
cfp->name, lstr);
return RIG_OK;
@ -1117,7 +1117,7 @@ static int dummy_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
/* load value */
*val = elp->val;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__,
cfp->name);
return RIG_OK;
@ -1128,7 +1128,7 @@ static int dummy_set_powerstat(RIG *rig, powerstat_t status)
{
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
priv->powerstat = status;
return RIG_OK;
@ -1140,7 +1140,7 @@ static int dummy_get_powerstat(RIG *rig, powerstat_t *status)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
*status = priv->powerstat;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -1168,7 +1168,7 @@ static int dummy_set_parm(RIG *rig, setting_t parm, value_t val)
sprintf(pstr, "%d", val.i);
}
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__,
rig_strparm(parm), pstr);
priv->parms[idx] = val;
@ -1189,7 +1189,7 @@ static int dummy_get_parm(RIG *rig, setting_t parm, value_t *val)
}
*val = priv->parms[idx];
rig_debug(RIG_DEBUG_VERBOSE, "%s called %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called %s\n", __func__,
rig_strparm(parm));
return RIG_OK;
@ -1255,7 +1255,7 @@ static int dummy_set_ext_parm(RIG *rig, token_t token, value_t val)
epp->val = val;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %s\n", __func__,
cfp->name, lstr);
return RIG_OK;
@ -1295,7 +1295,7 @@ static int dummy_get_ext_parm(RIG *rig, token_t token, value_t *val)
/* load value */
*val = epp->val;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__,
cfp->name);
return RIG_OK;
@ -1309,7 +1309,7 @@ static int dummy_set_ant(RIG *rig, vfo_t vfo, ant_t ant)
channel_t *curr = priv->curr;
curr->ant = ant;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -1320,7 +1320,7 @@ static int dummy_get_ant(RIG *rig, vfo_t vfo, ant_t *ant)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
channel_t *curr = priv->curr;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
*ant = curr->ant;
return RIG_OK;
@ -1332,7 +1332,7 @@ static int dummy_set_bank(RIG *rig, vfo_t vfo, int bank)
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
priv->bank = bank;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -1342,7 +1342,7 @@ static int dummy_set_mem(RIG *rig, vfo_t vfo, int ch)
{
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (ch < 0 || ch >= NB_CHAN)
{
@ -1368,14 +1368,14 @@ static int dummy_get_mem(RIG *rig, vfo_t vfo, int *ch)
channel_t *curr = priv->curr;
*ch = curr->channel_num;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
static int dummy_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s %d\n", __func__,
rig_strscan(scan), ch);
/* TODO: change freq, etc. */
return RIG_OK;
@ -1395,7 +1395,7 @@ static int dummy_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
freq_t freq;
shortfreq_t ts;
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__,
rig_strvfop(op));
switch (op)
@ -1451,7 +1451,7 @@ static int dummy_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
break;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s beep!\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s beep!\n", __func__);
break;
case RIG_OP_XCHG: /* Exchange VFO A/B */
@ -1568,7 +1568,7 @@ static int dummy_set_channel(RIG *rig, const channel_t *chan)
{
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (!chan->ext_levels)
{
@ -1613,7 +1613,7 @@ static int dummy_get_channel(RIG *rig, channel_t *chan)
{
struct dummy_priv_data *priv = (struct dummy_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (chan->channel_num < 0 || chan->channel_num >= NB_CHAN)
{
@ -1661,7 +1661,7 @@ static int dummy_get_channel(RIG *rig, channel_t *chan)
static int dummy_set_trn(RIG *rig, int trn)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
@ -1670,14 +1670,14 @@ static int dummy_set_trn(RIG *rig, int trn)
static int dummy_get_trn(RIG *rig, int *trn)
{
*trn = RIG_TRN_OFF;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return RIG_OK;
}
static const char *dummy_get_info(RIG *rig)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return "Nothing much (dummy)";
}
@ -1685,14 +1685,14 @@ static const char *dummy_get_info(RIG *rig)
static int dummy_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, digits);
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, digits);
return RIG_OK;
}
static int dummy_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
strcpy(digits, "0123456789ABCDEF");
*length = 16;
@ -1701,7 +1701,7 @@ static int dummy_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
static int dummy_send_morse(RIG *rig, vfo_t vfo, const char *msg)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __FUNCTION__, msg);
rig_debug(RIG_DEBUG_VERBOSE, "%s called: %s\n", __func__, msg);
return RIG_OK;
}

Wyświetl plik

@ -238,7 +238,7 @@ static char *xml_build(char *cmd, char *value, char *xmlbuf, int xmllen)
// We want at least a 4K buf to play with
if (xmllen < 4096)
{
rig_debug(RIG_DEBUG_ERR, "%s: xmllen < 4096\n",__FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: xmllen < 4096\n",__func__);
return NULL;
}
@ -272,7 +272,7 @@ static char *xml_parse2(char *xml, char *value, int valueLen)
{
char *delims = "<>\r\n ";
char *xmltmp = strdup(xml);
//rig_debug(RIG_DEBUG_TRACE, "%s: xml='%s'\n", __FUNCTION__,xml);
//rig_debug(RIG_DEBUG_TRACE, "%s: xml='%s'\n", __func__,xml);
char *pr = xml;
char *p = strtok_r(xmltmp, delims, &pr);
value[0] = 0;
@ -305,7 +305,7 @@ static char *xml_parse2(char *xml, char *value, int valueLen)
}
else // we'll just stop adding stuff
{
rig_debug(RIG_DEBUG_ERR, "%s: max value length exceeded\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: max value length exceeded\n", __func__);
}
}
else
@ -314,11 +314,11 @@ static char *xml_parse2(char *xml, char *value, int valueLen)
}
}
rig_debug(RIG_DEBUG_TRACE, "%s: value returned='%s'\n", __FUNCTION__, value);
rig_debug(RIG_DEBUG_TRACE, "%s: value returned='%s'\n", __func__, value);
if (rig_need_debug(RIG_DEBUG_WARN) && value != NULL && strlen(value) == 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: xml='%s'\n", __FUNCTION__, xml);
rig_debug(RIG_DEBUG_ERR, "%s: xml='%s'\n", __func__, xml);
}
free(xmltmp);
@ -338,7 +338,7 @@ static char *xml_parse(char *xml, char *value, int value_len)
return NULL;
}
rig_debug(RIG_DEBUG_TRACE, "%s XML:\n%s\n", __FUNCTION__, xml);
rig_debug(RIG_DEBUG_TRACE, "%s XML:\n%s\n", __func__, xml);
// find the xml skipping the other stuff above it
char *pxml = strstr(xml, "<?xml");
@ -357,7 +357,7 @@ static char *xml_parse(char *xml, char *value, int value_len)
if (strstr(value, "faultString"))
{
rig_debug(RIG_DEBUG_ERR, "%s error:\n%s\n", __FUNCTION__, value);
rig_debug(RIG_DEBUG_ERR, "%s error:\n%s\n", __func__, value);
value[0] = 0; /* truncate to give empty response */
}
@ -373,7 +373,7 @@ static int read_transaction(RIG *rig, char *xml, int xml_len)
int retval;
char *terminator = "</methodResponse>";
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct rig_state *rs = &rig->state;
rs->rigport.timeout = 1000; // 2 second read string timeout
@ -387,13 +387,13 @@ static int read_transaction(RIG *rig, char *xml, int xml_len)
char tmp_buf[MAXXMLLEN]; // plenty big for expected flrig responses
int len = read_string(&rs->rigport, tmp_buf, sizeof(tmp_buf), delims,
strlen(delims));
rig_debug(RIG_DEBUG_TRACE, "%s: string='%s'", __FUNCTION__, tmp_buf);
rig_debug(RIG_DEBUG_TRACE, "%s: string='%s'", __func__, tmp_buf);
if (len > 0) { retry = 3; }
if (len <= 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: read_string error=%d\n", __FUNCTION__, len);
rig_debug(RIG_DEBUG_ERR, "%s: read_string error=%d\n", __func__, len);
return -(100 + RIG_EPROTO);
}
@ -403,19 +403,19 @@ static int read_transaction(RIG *rig, char *xml, int xml_len)
if (retry == 0)
{
rig_debug(RIG_DEBUG_WARN, "%s: retry timeout\n", __FUNCTION__);
rig_debug(RIG_DEBUG_WARN, "%s: retry timeout\n", __func__);
}
if (strstr(xml, terminator))
{
rig_debug(RIG_DEBUG_TRACE, "%s: got %s\n", __FUNCTION__, terminator);
rig_debug(RIG_DEBUG_TRACE, "%s: got %s\n", __func__, terminator);
// Slow down just a bit -- not sure this is needed anymore but not a big deal here
usleep(2 * 1000);
retval = RIG_OK;
}
else
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: did not get %s\n", __FUNCTION__, terminator);
rig_debug(RIG_DEBUG_VERBOSE, "%s: did not get %s\n", __func__, terminator);
retval = -(101 + RIG_EPROTO);
}
@ -439,7 +439,7 @@ static int write_transaction(RIG *rig, char *xml, int xml_len)
// We need to avoid and empty write as rigctld replies with blank line
if (xml_len == 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: len==0??\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: len==0??\n", __func__);
return retval;
}
@ -467,7 +467,7 @@ static int write_transaction(RIG *rig, char *xml, int xml_len)
static int flrig_init(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __FUNCTION__, BACKEND_VER);
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __func__, BACKEND_VER);
struct flrig_priv_data *priv = (struct flrig_priv_data *)malloc(sizeof(
struct flrig_priv_data));
@ -519,7 +519,7 @@ static const char *modeMapGetFLRig(rmode_t modeHamlib)
}
}
rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode requested: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode requested: %s\n", __func__,
rig_strrmode(modeHamlib));
return "ERROR";
}
@ -537,7 +537,7 @@ static rmode_t modeMapGetHamlib(const char *modeFLRig)
for (i = 0; modeMap[i].mode_hamlib != 0; ++i)
{
rig_debug(RIG_DEBUG_TRACE, "%s: find '%s' in '%s'\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: find '%s' in '%s'\n", __func__,
modeFLRigCheck, modeMap[i].mode_flrig);
if (modeMap[i].mode_flrig
@ -547,7 +547,7 @@ static rmode_t modeMapGetHamlib(const char *modeFLRig)
}
}
rig_debug(RIG_DEBUG_TRACE, "%s: Unknown mode requested: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: Unknown mode requested: %s\n", __func__,
modeFLRig);
return RIG_MODE_NONE;
}
@ -560,7 +560,7 @@ static rmode_t modeMapGetHamlib(const char *modeFLRig)
static void modeMapAdd(rmode_t *modes, rmode_t mode_hamlib, char *mode_flrig)
{
int i;
rig_debug(RIG_DEBUG_TRACE, "%s:mode_flrig=%s\n", __FUNCTION__, mode_flrig);
rig_debug(RIG_DEBUG_TRACE, "%s:mode_flrig=%s\n", __func__, mode_flrig);
// if we already have it just return
// We get ERROR if the mode is not known so non-ERROR is OK
@ -582,7 +582,7 @@ static void modeMapAdd(rmode_t *modes, rmode_t mode_hamlib, char *mode_flrig)
if (modeMap[i].mode_flrig == NULL)
{
rig_debug(RIG_DEBUG_ERR, "%s: error allocating memory for modeMap\n",
__FUNCTION__);
__func__);
return;
}
}
@ -596,7 +596,7 @@ static void modeMapAdd(rmode_t *modes, rmode_t mode_hamlib, char *mode_flrig)
strncat(modeMap[i].mode_flrig, mode_flrig, len1 + len2);
strncat(modeMap[i].mode_flrig, "|", len1 + len2);
rig_debug(RIG_DEBUG_TRACE,"%s: Adding mode=%s, index=%d, result=%s\n",
__FUNCTION__, mode_flrig, i, modeMap[i].mode_flrig);
__func__, mode_flrig, i, modeMap[i].mode_flrig);
return;
}
}
@ -612,7 +612,7 @@ static int flrig_open(RIG *rig)
char xml[MAXXMLLEN];
char value[MAXXMLLEN];
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __FUNCTION__, BACKEND_VER);
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __func__, BACKEND_VER);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -638,12 +638,12 @@ static int flrig_open(RIG *rig)
if (strlen(value) > 0) /* must have it since we got an answer */
{
priv->has_get_modeA = 1;
rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeA is available=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeA is available=%s\n", __func__,
value);
}
else
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeA is not available\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: getmodeA is not available\n", __func__);
}
/* see if get_bwA is available */
@ -655,12 +655,12 @@ static int flrig_open(RIG *rig)
if (strlen(value) > 0) /* must have it since we got an answer */
{
priv->has_get_bwA = 1;
rig_debug(RIG_DEBUG_VERBOSE, "%s: get_bwA is available=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: get_bwA is available=%s\n", __func__,
value);
}
else
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: get_bwA is not available\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: get_bwA is not available\n", __func__);
}
pxml = xml_build("rig.get_AB", value, xml, sizeof(xml));
@ -677,7 +677,7 @@ static int flrig_open(RIG *rig)
priv->curr_vfo = RIG_VFO_B;
}
rig_debug(RIG_DEBUG_TRACE, "%s: currvfo=%s value=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: currvfo=%s value=%s\n", __func__,
rig_strvfo(priv->curr_vfo), value);
//vfo_t vfo=RIG_VFO_A;
//vfo_t vfo_tx=RIG_VFO_B; // split is always VFOB
@ -694,7 +694,7 @@ static int flrig_open(RIG *rig)
read_transaction(rig, xml, sizeof(xml));
xml_parse(xml, value, sizeof(value));
rig_debug(RIG_DEBUG_TRACE, "%s: modes=%s\n", __FUNCTION__, value);
rig_debug(RIG_DEBUG_TRACE, "%s: modes=%s\n", __func__, value);
rmode_t modes = 0;
char *p;
char *pr = value;
@ -753,11 +753,11 @@ static int flrig_open(RIG *rig)
else if (streq(p, "RTTY(U)")) { modeMapAdd(&modes, RIG_MODE_RTTY, p); }
else if (streq(p, "RTTY(R")) { modeMapAdd(&modes, RIG_MODE_RTTYR, p); }
else if (streq(p, "DIG")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); }
else { rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode (new?) for this rig='%s'\n", __FUNCTION__, p); }
else { rig_debug(RIG_DEBUG_ERR, "%s: Unknown mode (new?) for this rig='%s'\n", __func__, p); }
}
rig->state.mode_list = modes;
rig_debug(RIG_DEBUG_VERBOSE, "%s: hamlib modes=%s\n", __FUNCTION__, rig_strrmode(modes));
rig_debug(RIG_DEBUG_VERBOSE, "%s: hamlib modes=%s\n", __func__, rig_strrmode(modes));
return RIG_OK;
}
@ -768,7 +768,7 @@ static int flrig_open(RIG *rig)
*/
static int flrig_close(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
return RIG_OK;
}
@ -804,7 +804,7 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -812,7 +812,7 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
if (check_vfo(vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -820,7 +820,7 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
vfo = priv->curr_vfo;
rig_debug(RIG_DEBUG_TRACE, "%s: get_freq2 vfo=%s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
}
int retries = 10;
@ -852,7 +852,7 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
if (strlen(value) == 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: retries=%d\n", __FUNCTION__, retries);
rig_debug(RIG_DEBUG_ERR, "%s: retries=%d\n", __func__, retries);
//usleep(10*1000);
}
}
@ -862,13 +862,13 @@ static int flrig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
if (*freq == 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: freq==0??\nvalue=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: freq==0??\nvalue=%s\n", __func__,
value);
return -(102 + RIG_EPROTO);
}
else
{
rig_debug(RIG_DEBUG_TRACE, "%s: freq=%.0f\n", __FUNCTION__, *freq);
rig_debug(RIG_DEBUG_TRACE, "%s: freq=%.0f\n", __func__, *freq);
}
if (vfo == RIG_VFO_A)
@ -891,7 +891,7 @@ static int flrig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.0f\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.0f\n", __func__,
rig_strvfo(vfo), freq);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -899,7 +899,7 @@ static int flrig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (check_vfo(vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -960,14 +960,14 @@ static int flrig_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: ptt=%d\n", __FUNCTION__, ptt);
rig_debug(RIG_DEBUG_TRACE, "%s: ptt=%d\n", __func__, ptt);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
if (check_vfo(vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -999,7 +999,7 @@ static int flrig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1018,7 +1018,7 @@ static int flrig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
char value[MAXCMDLEN];
xml_parse(xml, value, sizeof(value));
*ptt = atoi(value);
rig_debug(RIG_DEBUG_TRACE, "%s: '%s'\n", __FUNCTION__, value);
rig_debug(RIG_DEBUG_TRACE, "%s: '%s'\n", __func__, value);
priv->ptt = *ptt;
@ -1034,7 +1034,7 @@ static int flrig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t mode,
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s mode=%s width=%d\n",
__FUNCTION__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
__func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1051,9 +1051,9 @@ static int flrig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t mode,
// If no change don't do it...modes are kept up to date by client calls
// to get_mode and set_mode so should be current here
rig_debug(RIG_DEBUG_TRACE, "%s: vfoa privmode=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfoa privmode=%s\n", __func__,
rig_strrmode(priv->curr_modeA));
rig_debug(RIG_DEBUG_TRACE, "%s: vfob privmode=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfob privmode=%s\n", __func__,
rig_strrmode(priv->curr_modeB));
// save some VFO swapping .. may replace with VFO specific calls that won't cause VFO change
@ -1062,7 +1062,7 @@ static int flrig_set_split_mode(RIG *rig, vfo_t vfo, rmode_t mode,
if (vfo == RIG_VFO_B && mode == priv->curr_modeB) { return RIG_OK; }
retval = flrig_set_mode(rig, vfo, mode, width);
rig_debug(RIG_DEBUG_TRACE, "%s: set mode=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: set mode=%s\n", __func__,
rig_strrmode(mode));
return retval;
}
@ -1076,7 +1076,7 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s mode=%s width=%d\n",
__FUNCTION__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
__func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1095,33 +1095,33 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (check_vfo(vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
if (priv->ptt)
{
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __FUNCTION__);
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __func__);
return RIG_OK; // just return OK and ignore this
}
// Switch to VFOB if appropriate since we can't set mode directly
// MDB
int vfoSwitched = 0;
rig_debug(RIG_DEBUG_TRACE, "%s: curr_vfo = %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: curr_vfo = %s\n", __func__,
rig_strvfo(priv->curr_vfo));
// If we don't have the get_bwA call we have to switch VFOs ourself
if (!priv->has_get_bwA && vfo == RIG_VFO_B && priv->curr_vfo != RIG_VFO_B)
{
vfoSwitched = 1;
rig_debug(RIG_DEBUG_TRACE, "%s: switch to VFOB = %d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: switch to VFOB = %d\n", __func__,
vfoSwitched);
}
if (vfoSwitched) // swap to B and we'll swap back later
{
rig_debug(RIG_DEBUG_TRACE, "%s: switching to VFOB = %d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: switching to VFOB = %d\n", __func__,
vfoSwitched);
retval = flrig_set_vfo(rig, RIG_VFO_B);
@ -1133,7 +1133,7 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
// Set the mode
char *ttmode = strdup(modeMapGetFLRig(mode));
rig_debug(RIG_DEBUG_TRACE, "%s: got ttmode = %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: got ttmode = %s\n", __func__,
ttmode == NULL ? "NULL" : ttmode);
char *pttmode = ttmode;
@ -1165,7 +1165,7 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
pxml = xml_build(cmd, cmd_buf, xml, sizeof(xml));
}
rig_debug(RIG_DEBUG_TRACE, "%s: write_transaction\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s: write_transaction\n", __func__);
retval = write_transaction(rig, pxml, strlen(pxml));
if (retval < 0)
@ -1173,10 +1173,10 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
return retval;
}
rig_debug(RIG_DEBUG_TRACE, "%s: read_transaction\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s: read_transaction\n", __func__);
// Get the response
read_transaction(rig, xml, sizeof(xml));
rig_debug(RIG_DEBUG_TRACE, "%s: response=%s\n", __FUNCTION__, xml);
rig_debug(RIG_DEBUG_TRACE, "%s: response=%s\n", __func__, xml);
// Determine if we need to update the bandwidth
int needBW = 0;
@ -1185,17 +1185,17 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{
needBW = priv->curr_widthA != width;
rig_debug(RIG_DEBUG_TRACE, "%s: bw change on VFOA, curr width=%d needBW=%d\n",
__FUNCTION__, (int)width, needBW);
__func__, (int)width, needBW);
}
else if (vfo == RIG_VFO_B)
{
needBW = priv->curr_widthB != width;
rig_debug(RIG_DEBUG_TRACE, "%s: bw change on VFOB, curr width=%d needBW=%d\n",
__FUNCTION__, (int)width, needBW);
__func__, (int)width, needBW);
}
else
{
rig_debug(RIG_DEBUG_TRACE, "%s: needBW unknown vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: needBW unknown vfo=%s\n", __func__,
rig_strvfo(vfo));
}
@ -1223,12 +1223,12 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
}
// Return to VFOA if needed
rig_debug(RIG_DEBUG_TRACE, "%s: switch to VFOA? = %d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: switch to VFOA? = %d\n", __func__,
vfoSwitched);
if (vfoSwitched)
{
rig_debug(RIG_DEBUG_TRACE, "%s: switching to VFOA\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s: switching to VFOA\n", __func__);
retval = flrig_set_vfo(rig, RIG_VFO_A);
if (retval < 0)
@ -1249,7 +1249,7 @@ static int flrig_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
}
rig_debug(RIG_DEBUG_TRACE,
"%s: return modeA=%s, widthA=%d\n,modeB=%s, widthB=%d\n", __FUNCTION__,
"%s: return modeA=%s, widthA=%d\n,modeB=%s, widthB=%d\n", __func__,
rig_strrmode(priv->curr_modeA), (int)priv->curr_widthA,
rig_strrmode(priv->curr_modeB), (int)priv->curr_widthB);
return RIG_OK;
@ -1263,7 +1263,7 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1271,7 +1271,7 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (check_vfo(vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1282,7 +1282,7 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
vfo = priv->curr_vfo;
}
rig_debug(RIG_DEBUG_TRACE, "%s: using vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: using vfo=%s\n", __func__,
rig_strvfo(vfo));
if (priv->ptt)
@ -1290,7 +1290,7 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (vfo == RIG_VFO_A) { *mode = priv->curr_modeA; }
else { *mode = priv->curr_modeB; }
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __FUNCTION__);
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __func__);
return RIG_OK; // just return OK and ignore this
}
@ -1304,7 +1304,7 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (vfoSwitched)
{
rig_debug(RIG_DEBUG_TRACE, "%s switch to VFOB=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s switch to VFOB=%d\n", __func__,
priv->has_get_modeA);
retval = flrig_set_vfo(rig, RIG_VFO_B);
@ -1347,7 +1347,7 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
}
*mode = retval;
rig_debug(RIG_DEBUG_TRACE, "%s: mode='%s'\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: mode='%s'\n", __func__,
rig_strrmode(*mode));
if (vfo == RIG_VFO_A)
@ -1384,7 +1384,7 @@ static int flrig_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
read_transaction(rig, xml, sizeof(xml));
xml_parse(xml, value, sizeof(value));
rig_debug(RIG_DEBUG_TRACE, "%s: mode=%s width='%s'\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: mode=%s width='%s'\n", __func__,
rig_strrmode(*mode), value);
// we get 2 entries pipe separated for bandwidth, lower and upper
@ -1429,7 +1429,7 @@ static int flrig_set_vfo(RIG *rig, vfo_t vfo)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct rig_state *rs = &rig->state;
@ -1438,13 +1438,13 @@ static int flrig_set_vfo(RIG *rig, vfo_t vfo)
if (check_vfo(vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
if (vfo == RIG_VFO_TX)
{
rig_debug(RIG_DEBUG_TRACE, "%s: RIG_VFO_TX used\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s: RIG_VFO_TX used\n",__func__);
vfo = RIG_VFO_B; // always TX on VFOB
}
@ -1499,7 +1499,7 @@ static int flrig_get_vfo(RIG *rig, vfo_t *vfo)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1515,7 +1515,7 @@ static int flrig_get_vfo(RIG *rig, vfo_t *vfo)
read_transaction(rig, xml, sizeof(xml));
char value[MAXCMDLEN];
xml_parse(xml, value, sizeof(value));
rig_debug(RIG_DEBUG_TRACE, "%s: vfo value=%s\n", __FUNCTION__, value);
rig_debug(RIG_DEBUG_TRACE, "%s: vfo value=%s\n", __func__, value);
switch (value[0])
{
@ -1535,13 +1535,13 @@ static int flrig_get_vfo(RIG *rig, vfo_t *vfo)
if (check_vfo(*vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(*vfo));
__func__, rig_strvfo(*vfo));
return -RIG_EINVAL;
}
priv->curr_vfo = *vfo;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(*vfo));
return RIG_OK;
@ -1555,7 +1555,7 @@ static int flrig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.1f\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.1f\n", __func__,
rig_strvfo(vfo), tx_freq);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1563,7 +1563,7 @@ static int flrig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
if (check_vfo(vfo) == FALSE)
{
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1601,7 +1601,7 @@ static int flrig_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
*/
static int flrig_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
{
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1619,7 +1619,7 @@ static int flrig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: tx_vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: tx_vfo=%s\n", __func__,
rig_strvfo(tx_vfo));
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1639,7 +1639,7 @@ static int flrig_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (priv->ptt)
{
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __FUNCTION__);
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __func__);
return RIG_OK; // just return OK and ignore this
}
@ -1671,7 +1671,7 @@ static int flrig_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split,
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
char xml[MAXXMLLEN];
@ -1690,7 +1690,7 @@ static int flrig_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split,
*tx_vfo = RIG_VFO_B;
*split = atoi(value);
priv->split = *split;
rig_debug(RIG_DEBUG_TRACE, "%s tx_vfo=%s, split=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s tx_vfo=%s, split=%d\n", __func__,
rig_strvfo(*tx_vfo), *split);
return RIG_OK;
}
@ -1704,7 +1704,7 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
@ -1715,7 +1715,7 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
if (priv->ptt)
{
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __FUNCTION__);
rig_debug(RIG_DEBUG_WARN, "%s call not made as PTT=1\n", __func__);
return RIG_OK; // just return OK and ignore this
}
@ -1723,7 +1723,7 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
if (retval != RIG_OK)
{
rig_debug(RIG_DEBUG_ERR, "%s flrig_set_freq failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s flrig_set_freq failed\n", __func__);
return retval;
}
@ -1740,7 +1740,7 @@ static int flrig_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq,
if (retval != RIG_OK)
{
rig_debug(RIG_DEBUG_ERR, "%s flrig_set_mode failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s flrig_set_mode failed\n", __func__);
return retval;
}
@ -1780,7 +1780,7 @@ static int flrig_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq,
static const char *flrig_get_info(RIG *rig)
{
struct flrig_priv_data *priv = (struct flrig_priv_data *) rig->state.priv;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
return priv->info;
}

Wyświetl plik

@ -75,7 +75,7 @@ static int netampctl_open(AMP *amp)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "\\dump_state\n");
@ -111,7 +111,7 @@ static int netampctl_open(AMP *amp)
return (ret < 0) ? ret : -RIG_EPROTO;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __FUNCTION__, buf);
rig_debug(RIG_DEBUG_VERBOSE, "%s called, string=%s\n", __func__, buf);
}
while (ret > 0);
@ -120,7 +120,7 @@ static int netampctl_open(AMP *amp)
static int netampctl_close(AMP *amp)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
/* clean signoff, no read back */
write_block(&amp->state.ampport, "q\n", 2);
@ -130,13 +130,13 @@ static int netampctl_close(AMP *amp)
static int netampctl_set_freq(AMP *amp, freq_t freq)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return -RIG_ENIMPL;
}
static int netampctl_get_freq(AMP *amp, freq_t *freq)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
*freq = 12345;
return -RIG_ENIMPL;
}
@ -148,7 +148,7 @@ static int netampctl_reset(AMP *amp, amp_reset_t reset)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "R %d\n", reset);
@ -171,7 +171,7 @@ static const char *netampctl_get_info(AMP *amp)
char cmd[CMD_MAX];
static char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "_\n");

Wyświetl plik

@ -65,7 +65,7 @@ static int netrigctl_transaction(RIG *rig, char *cmd, int len, char *buf)
{
int ret;
rig_debug(RIG_DEBUG_VERBOSE, "%s: called len=%d\n", __FUNCTION__, len);
rig_debug(RIG_DEBUG_VERBOSE, "%s: called len=%d\n", __func__, len);
/* flush anything in the read buffer before command is sent */
if (rig->state.rigport.type.rig == RIG_PORT_NETWORK
@ -148,7 +148,7 @@ static int netrigctl_init(RIG *rig)
memset(priv, 0, sizeof(struct netrigctl_priv_data));
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __FUNCTION__, rig->caps->version);
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __func__, rig->caps->version);
/*
* set arbitrary initial status
@ -179,7 +179,7 @@ static int netrigctl_open(RIG *rig)
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
struct netrigctl_priv_data *priv;
priv = (struct netrigctl_priv_data *)rig->state.priv;
@ -193,11 +193,11 @@ static int netrigctl_open(RIG *rig)
}
else if (ret < 0)
{
rig_debug(RIG_DEBUG_WARN, "%s: chk_vfo error: %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_WARN, "%s: chk_vfo error: %s\n", __func__,
rigerror(ret));
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo_mode=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo_mode=%d\n", __func__,
priv->rigctld_vfo_mode);
len = sprintf(cmd, "\\dump_state\n");
@ -506,7 +506,7 @@ static int netrigctl_open(RIG *rig)
static int netrigctl_close(RIG *rig)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
/* clean signoff, no read back */
write_block(&rig->state.rigport, "q\n", 2);
@ -520,7 +520,7 @@ static int netrigctl_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -547,7 +547,7 @@ static int netrigctl_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -576,7 +576,7 @@ static int netrigctl_set_mode(RIG *rig, vfo_t vfo, rmode_t mode,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -606,7 +606,7 @@ static int netrigctl_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -645,7 +645,7 @@ static int netrigctl_set_vfo(RIG *rig, vfo_t vfo)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -673,7 +673,7 @@ static int netrigctl_get_vfo(RIG *rig, vfo_t *vfo)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
struct netrigctl_priv_data *priv;
priv = (struct netrigctl_priv_data *)rig->state.priv;
@ -710,7 +710,7 @@ static int netrigctl_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -738,7 +738,7 @@ static int netrigctl_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -765,7 +765,7 @@ static int netrigctl_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -794,7 +794,7 @@ static int netrigctl_set_rptr_shift(RIG *rig, vfo_t vfo,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -823,7 +823,7 @@ static int netrigctl_get_rptr_shift(RIG *rig, vfo_t vfo,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -853,7 +853,7 @@ static int netrigctl_set_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t rptr_offs)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -881,7 +881,7 @@ static int netrigctl_get_rptr_offs(RIG *rig, vfo_t vfo, shortfreq_t *rptr_offs)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -909,7 +909,7 @@ static int netrigctl_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -937,7 +937,7 @@ static int netrigctl_get_ctcss_tone(RIG *rig, vfo_t vfo, tone_t *tone)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -965,7 +965,7 @@ static int netrigctl_set_dcs_code(RIG *rig, vfo_t vfo, tone_t code)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -993,7 +993,7 @@ static int netrigctl_get_dcs_code(RIG *rig, vfo_t vfo, tone_t *code)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1021,7 +1021,7 @@ static int netrigctl_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1049,7 +1049,7 @@ static int netrigctl_get_ctcss_sql(RIG *rig, vfo_t vfo, tone_t *tone)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1077,7 +1077,7 @@ static int netrigctl_set_dcs_sql(RIG *rig, vfo_t vfo, unsigned int code)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1104,7 +1104,7 @@ static int netrigctl_get_dcs_sql(RIG *rig, vfo_t vfo, unsigned int *code)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1132,7 +1132,7 @@ static int netrigctl_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1160,7 +1160,7 @@ static int netrigctl_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1188,7 +1188,7 @@ static int netrigctl_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1217,7 +1217,7 @@ static int netrigctl_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1256,7 +1256,7 @@ static int netrigctl_set_split_vfo(RIG *rig, vfo_t vfo, split_t split,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1285,7 +1285,7 @@ static int netrigctl_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1324,7 +1324,7 @@ static int netrigctl_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1352,7 +1352,7 @@ static int netrigctl_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1380,7 +1380,7 @@ static int netrigctl_set_xit(RIG *rig, vfo_t vfo, shortfreq_t xit)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1408,7 +1408,7 @@ static int netrigctl_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1436,7 +1436,7 @@ static int netrigctl_set_ts(RIG *rig, vfo_t vfo, shortfreq_t ts)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1464,7 +1464,7 @@ static int netrigctl_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), RIG_VFO_A);
@ -1492,7 +1492,7 @@ static int netrigctl_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1520,7 +1520,7 @@ static int netrigctl_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1550,7 +1550,7 @@ static int netrigctl_set_level(RIG *rig, vfo_t vfo, setting_t level,
char buf[BUF_MAX];
char lstr[32];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (RIG_LEVEL_IS_FLOAT(level))
{
@ -1590,7 +1590,7 @@ static int netrigctl_get_level(RIG *rig, vfo_t vfo, setting_t level,
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1625,7 +1625,7 @@ static int netrigctl_set_powerstat(RIG *rig, powerstat_t status)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "\\set_powerstat %d\n", status);
@ -1648,7 +1648,7 @@ static int netrigctl_get_powerstat(RIG *rig, powerstat_t *status)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "\\get_powerstat\n");
@ -1672,7 +1672,7 @@ static int netrigctl_set_parm(RIG *rig, setting_t parm, value_t val)
char buf[BUF_MAX];
char pstr[32];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (RIG_PARM_IS_FLOAT(parm))
{
@ -1704,7 +1704,7 @@ static int netrigctl_get_parm(RIG *rig, setting_t parm, value_t *val)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "p %s\n", rig_strparm(parm));
@ -1734,7 +1734,7 @@ static int netrigctl_set_ant(RIG *rig, vfo_t vfo, ant_t ant)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1762,7 +1762,7 @@ static int netrigctl_get_ant(RIG *rig, vfo_t vfo, ant_t *ant)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1790,7 +1790,7 @@ static int netrigctl_set_bank(RIG *rig, vfo_t vfo, int bank)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "B %d\n", bank);
@ -1813,7 +1813,7 @@ static int netrigctl_set_mem(RIG *rig, vfo_t vfo, int ch)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1841,7 +1841,7 @@ static int netrigctl_get_mem(RIG *rig, vfo_t vfo, int *ch)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
char vfostr[6] = "";
ret = netrigctl_vfostr(rig, vfostr, sizeof(vfostr), vfo);
@ -1868,7 +1868,7 @@ static int netrigctl_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "g %s %d\n", rig_strscan(scan), ch);
@ -1890,7 +1890,7 @@ static int netrigctl_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "J %s\n", rig_strvfop(op));
@ -1924,7 +1924,7 @@ static const char *netrigctl_get_info(RIG *rig)
char cmd[CMD_MAX];
static char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "_\n");
@ -1948,7 +1948,7 @@ static int netrigctl_send_dtmf(RIG *rig, vfo_t vfo, const char *digits)
char *cmdp, cmd[] = "\\send_dtmf ";
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
// allocate memory for size of (cmd + digits + \n + \0)
cmdp = malloc(strlen(cmd) + strlen(digits) + 2);
@ -1979,7 +1979,7 @@ static int netrigctl_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
char cmd[CMD_MAX];
static char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "\\recv_dtmf\n");
@ -2008,7 +2008,7 @@ static int netrigctl_send_morse(RIG *rig, vfo_t vfo, const char *msg)
char *cmdp, cmd[] = "\\send_morse ";
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
// allocate memory for size of (cmd + msg + \n + \0)
cmdp = malloc(strlen(cmd) + strlen(msg) + 2);

Wyświetl plik

@ -67,7 +67,7 @@ static int netrotctl_open(ROT *rot)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "\\dump_state\n");
@ -114,7 +114,7 @@ static int netrotctl_open(ROT *rot)
static int netrotctl_close(ROT *rot)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
/* clean signoff, no read back */
write_block(&rot->state.rotport, "q\n", 2);
@ -128,7 +128,7 @@ static int netrotctl_set_position(ROT *rot, azimuth_t az, elevation_t el)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %f %f\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %f %f\n", __func__,
az, el);
len = sprintf(cmd, "P %f %f\n", az, el);
@ -146,7 +146,7 @@ static int netrotctl_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "p\n");
@ -172,7 +172,7 @@ static int netrotctl_stop(ROT *rot)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "S\n");
@ -190,7 +190,7 @@ static int netrotctl_park(ROT *rot)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "K\n");
@ -207,7 +207,7 @@ static int netrotctl_reset(ROT *rot, rot_reset_t reset)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "R %d\n", reset);
@ -224,7 +224,7 @@ static int netrotctl_move(ROT *rot, int direction, int speed)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "M %d %d\n", direction, speed);
@ -241,7 +241,7 @@ static const char *netrotctl_get_info(ROT *rot)
char cmd[CMD_MAX];
static char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "_\n");

Wyświetl plik

@ -225,14 +225,14 @@ static int vfo_curr(RIG *rig, vfo_t vfo)
*/
static int read_transaction(RIG *rig, char *response, int response_len)
{
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct rig_state *rs = &rig->state;
char *delims="\n";
int len = read_string(&rs->rigport, response, response_len, delims, strlen(delims));
if (len <= 0) {
rig_debug(RIG_DEBUG_ERR,"%s: read_string error=%d\n",__FUNCTION__,len);
rig_debug(RIG_DEBUG_ERR,"%s: read_string error=%d\n",__func__,len);
return -RIG_EPROTO;
}
return RIG_OK;
@ -245,7 +245,7 @@ static int read_transaction(RIG *rig, char *response, int response_len)
static int trxmanager_init(RIG *rig)
{
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __FUNCTION__, BACKEND_VER);
rig_debug(RIG_DEBUG_TRACE, "%s version %s\n", __func__, BACKEND_VER);
struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *)malloc(sizeof(struct trxmanager_priv_data));
@ -280,7 +280,7 @@ static int trxmanager_open(RIG *rig) {
int retval;
char response[MAXCMDLEN] = "";
rig_debug(RIG_DEBUG_VERBOSE, "%s version %s\n", __FUNCTION__, BACKEND_VER);
rig_debug(RIG_DEBUG_VERBOSE, "%s version %s\n", __func__, BACKEND_VER);
struct rig_state *rs = &rig->state;
struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *) rig->state.priv;
@ -288,17 +288,17 @@ static int trxmanager_open(RIG *rig) {
rs->rigport.timeout = 10000; // long timeout for antenna switching/tuning
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
if (strlen(response)==0) {
rig_debug(RIG_DEBUG_ERR,"%s response len==0\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s response len==0\n", __func__);
return -RIG_EPROTO;
}
// Should have rig info now
strtok(response,";\r\n");
strncpy(priv->info,&response[2],sizeof(priv->info));
rig_debug(RIG_DEBUG_VERBOSE,"%s connected to %s\n", __FUNCTION__, priv->info);
rig_debug(RIG_DEBUG_VERBOSE,"%s connected to %s\n", __func__, priv->info);
// Turn off active messages
char *cmd = "AI0;";
@ -308,25 +308,25 @@ static int trxmanager_open(RIG *rig) {
}
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
if (strncmp("AI0;",response,4)!=0) {
rig_debug(RIG_DEBUG_ERR,"%s AI invalid response=%s\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR,"%s AI invalid response=%s\n", __func__, response);
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_VERBOSE,"%s AI response=%s\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_VERBOSE,"%s AI response=%s\n", __func__, response);
cmd = "FN;";
retval = write_block(&rs->rigport, cmd, strlen(cmd));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s FN; write failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s FN; write failed\n", __func__);
}
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
rig_debug(RIG_DEBUG_VERBOSE,"%s FN response=%s\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_VERBOSE,"%s FN response=%s\n", __func__, response);
priv->vfo_curr = RIG_VFO_A;
return retval;
@ -337,7 +337,7 @@ static int trxmanager_open(RIG *rig) {
* Assumes rig!=NULL
*/
static int trxmanager_close(RIG *rig) {
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
return RIG_OK;
}
@ -364,7 +364,7 @@ static int trxmanager_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct rig_state *rs = &rig->state;
@ -372,7 +372,7 @@ static int trxmanager_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
if (check_vfo(vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -383,7 +383,7 @@ static int trxmanager_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
priv->vfo_curr = vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s: get_freq2 vfo=%s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
}
char cmd[MAXCMDLEN];
@ -397,15 +397,15 @@ static int trxmanager_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
*freq = 0;
int n = sscanf(&response[2],"%lg",freq);
if (n != 1) {
rig_debug(RIG_DEBUG_ERR, "%s: can't parse freq from %s", __FUNCTION__,response);
rig_debug(RIG_DEBUG_ERR, "%s: can't parse freq from %s", __func__,response);
}
if (*freq == 0) {
rig_debug(RIG_DEBUG_ERR, "%s: freq==0??\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: freq==0??\n", __func__);
return -RIG_EPROTO;
}
return retval;
@ -419,7 +419,7 @@ static int trxmanager_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.1f\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.1f\n", __func__,
rig_strvfo(vfo), freq);
struct rig_state *rs = &rig->state;
@ -427,7 +427,7 @@ static int trxmanager_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (check_vfo(vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -451,7 +451,7 @@ static int trxmanager_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
retval = read_transaction(rig, response, sizeof(response)); // get response but don't care
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
return RIG_OK;
@ -465,13 +465,13 @@ static int trxmanager_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: ptt=%d\n", __FUNCTION__, ptt);
rig_debug(RIG_DEBUG_TRACE, "%s: ptt=%d\n", __func__, ptt);
struct rig_state *rs = &rig->state;
if (check_vfo(vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -487,10 +487,10 @@ static int trxmanager_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
if (strlen(response)!=5 || strstr(response, cmd)==NULL) {
rig_debug(RIG_DEBUG_ERR, "%s invalid response='%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s invalid response='%s'\n", __func__, response);
return -RIG_EPROTO;
}
@ -505,7 +505,7 @@ static int trxmanager_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct rig_state *rs = &rig->state;
@ -520,13 +520,13 @@ static int trxmanager_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
if (strlen(response)!= 40) {
rig_debug(RIG_DEBUG_ERR, "%s: invalid response='%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: invalid response='%s'\n", __func__, response);
return -RIG_EPROTO;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: IF response len=%d\n", __FUNCTION__, (int)strlen(response));
rig_debug(RIG_DEBUG_VERBOSE, "%s: IF response len=%d\n", __func__, (int)strlen(response));
char cptt = response[28];
*ptt = cptt == '0' ? 0 : 1;
@ -541,7 +541,7 @@ static int trxmanager_set_split_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s mode=%s width=%d\n",
__FUNCTION__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
__func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
retval = trxmanager_set_mode(rig,RIG_VFO_B,mode,width);
return retval;
}
@ -555,13 +555,13 @@ static int trxmanager_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t widt
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s mode=%s width=%d\n",
__FUNCTION__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
__func__, rig_strvfo(vfo), rig_strrmode(mode), (int)width);
struct rig_state *rs = &rig->state;
if (check_vfo(vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -604,7 +604,7 @@ static int trxmanager_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t widt
ttmode=FLRIG_MODE_PKTAM;
break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode %s\n",__FUNCTION__,rig_strrmode(mode));
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode %s\n",__func__,rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -620,9 +620,9 @@ static int trxmanager_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t widt
// Get the response
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: response=%s\n", __FUNCTION__,response);
rig_debug(RIG_DEBUG_VERBOSE, "%s: response=%s\n", __func__,response);
// Can't set BW on TRXManger as of 20180427 -- can only read it
@ -637,7 +637,7 @@ static int trxmanager_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *wi
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct rig_state *rs = &rig->state;
@ -645,7 +645,7 @@ static int trxmanager_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *wi
if (check_vfo(vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -655,7 +655,7 @@ static int trxmanager_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *wi
}
priv->vfo_curr = vfo;
}
rig_debug(RIG_DEBUG_TRACE, "%s: using vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: using vfo=%s\n", __func__,
rig_strvfo(vfo));
char cmd[MAXCMDLEN];
@ -668,12 +668,12 @@ static int trxmanager_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *wi
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
char tmode;
int n = sscanf(response,"MD%c;",&tmode);
if (n != 1 || strlen(response)!=6) {
rig_debug(RIG_DEBUG_ERR, "%s: invalid response='%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: invalid response='%s'\n", __func__, response);
return -RIG_EPROTO;
}
switch(tmode) {
@ -708,10 +708,10 @@ static int trxmanager_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *wi
*mode=RIG_MODE_PKTUSB;
break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unknown mode='%c'\n", __FUNCTION__, tmode);
rig_debug(RIG_DEBUG_ERR, "%s: unknown mode='%c'\n", __func__, tmode);
return -RIG_ENIMPL;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: mode='%s'\n", __FUNCTION__, rig_strrmode(*mode));
rig_debug(RIG_DEBUG_VERBOSE, "%s: mode='%s'\n", __func__, rig_strrmode(*mode));
// now get the bandwidth
snprintf(cmd,sizeof(cmd),"BW;");
@ -722,17 +722,17 @@ static int trxmanager_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *wi
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
if (strncmp(response,"BW",2)!=0) {
rig_debug(RIG_DEBUG_ERR, "%s: invalid response='%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s: invalid response='%s'\n", __func__, response);
return -RIG_EPROTO;
}
long iwidth = 0;
n = sscanf(response,"BW%ld;",&iwidth);
if (n != 1) {
rig_debug(RIG_DEBUG_ERR,"%s bandwidth scan failed '%s'\n", __FUNCTION__,strtok(response,"\r\n"));
rig_debug(RIG_DEBUG_ERR,"%s bandwidth scan failed '%s'\n", __func__,strtok(response,"\r\n"));
return -RIG_EPROTO;
}
*width=iwidth;
@ -744,7 +744,7 @@ static int trxmanager_set_vfo(RIG *rig, vfo_t vfo)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
struct rig_state *rs = &rig->state;
@ -752,7 +752,7 @@ static int trxmanager_set_vfo(RIG *rig, vfo_t vfo)
if (check_vfo(vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
if (vfo == RIG_VFO_TX) {
@ -776,7 +776,7 @@ static int trxmanager_set_vfo(RIG *rig, vfo_t vfo)
rs->tx_vfo = RIG_VFO_B; // always VFOB
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
return RIG_OK;
@ -788,7 +788,7 @@ static int trxmanager_get_vfo(RIG *rig, vfo_t *vfo)
// So we maintain our own internal state during set_vfo
// This keeps the hamlib interface consistent with other rigs
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *) rig->state.priv;
@ -811,13 +811,13 @@ static int trxmanager_get_vfo(RIG *rig, vfo_t *vfo)
if (check_vfo(*vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(*vfo));
__func__, rig_strvfo(*vfo));
return -RIG_EINVAL;
}
priv->vfo_curr = *vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__,
rig_strvfo(*vfo));
return RIG_OK;
@ -830,14 +830,14 @@ static int trxmanager_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.1f\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s freq=%.1f\n", __func__,
rig_strvfo(vfo), tx_freq);
struct rig_state *rs = &rig->state;
if (check_vfo(vfo) == FALSE) {
rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -850,7 +850,7 @@ static int trxmanager_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
}
retval = read_transaction(rig, response, sizeof(response)); // get response but don't care
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
return RIG_OK;
@ -862,7 +862,7 @@ static int trxmanager_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
*/
static int trxmanager_get_split_freq(RIG *rig, vfo_t vfo, freq_t *tx_freq)
{
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__,
rig_strvfo(vfo));
int retval = trxmanager_get_freq(rig, RIG_VFO_B, tx_freq);
return retval;
@ -876,7 +876,7 @@ static int trxmanager_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s: tx_vfo=%s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s: tx_vfo=%s\n", __func__,
rig_strvfo(tx_vfo));
struct rig_state *rs = &rig->state;
@ -910,11 +910,11 @@ static int trxmanager_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx
retval = read_transaction(rig, response, sizeof(response)); // get response but don't care
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
if (strlen(response)!=6 || strstr(response, cmd)==NULL) {
rig_debug(RIG_DEBUG_ERR, "%s invalid response='%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s invalid response='%s'\n", __func__, response);
return -RIG_EPROTO;
}
@ -929,7 +929,7 @@ static int trxmanager_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct rig_state *rs = &rig->state;
struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *) rig->state.priv;
@ -942,14 +942,14 @@ static int trxmanager_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *
}
retval = read_transaction(rig, response, sizeof(response)); // get response but don't care
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
*tx_vfo = RIG_VFO_B;
int tsplit=0;
int n = sscanf(response,"SP%d",&tsplit);
if (n == 0) {
rig_debug(RIG_DEBUG_ERR, "%s error getting split from '%s'\n", __FUNCTION__,response);
rig_debug(RIG_DEBUG_ERR, "%s error getting split from '%s'\n", __func__,response);
}
*split = tsplit;
priv->split = *split;
@ -964,7 +964,7 @@ static int trxmanager_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq, rmod
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s\n", __func__);
struct rig_state *rs = &rig->state;
struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *) rig->state.priv;
@ -983,10 +983,10 @@ static int trxmanager_set_split_freq_mode(RIG *rig, vfo_t vfo, freq_t freq, rmod
}
retval = read_transaction(rig, response, sizeof(response));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s read_transaction failed\n", __func__);
}
if (strlen(response)!=16 || strstr(response, cmd)==NULL) {
rig_debug(RIG_DEBUG_ERR, "%s invalid response='%s'\n", __FUNCTION__, response);
rig_debug(RIG_DEBUG_ERR, "%s invalid response='%s'\n", __func__, response);
FILE *fp=fopen("debug.txt","w+");
fprintf(fp,"XT response=%s\n",response);
fclose(fp);
@ -1020,7 +1020,7 @@ static int trxmanager_get_split_freq_mode(RIG *rig, vfo_t vfo, freq_t *freq, rmo
static const char *trxmanager_get_info(RIG *rig)
{
struct trxmanager_priv_data *priv = (struct trxmanager_priv_data *) rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return priv->info;
}

Wyświetl plik

@ -55,7 +55,7 @@ easycomm_transaction (ROT *rot, const char *cmdstr, char *data, size_t data_len)
struct rot_state *rs;
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called: %s\n", __FUNCTION__, cmdstr);
rig_debug(RIG_DEBUG_TRACE, "%s called: %s\n", __func__, cmdstr);
if (!rot )
return -RIG_EINVAL;
@ -72,10 +72,10 @@ easycomm_transaction (ROT *rot, const char *cmdstr, char *data, size_t data_len)
retval = read_string(&rs->rotport, data, data_len, "\n", 1);
if (retval < 0) {
rig_debug(RIG_DEBUG_TRACE, "%s read_string failed with status %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_TRACE, "%s read_string failed with status %d\n", __func__, retval);
goto transaction_quit;
} else {
rig_debug(RIG_DEBUG_TRACE, "%s read_string: %s\n", __FUNCTION__, data);
rig_debug(RIG_DEBUG_TRACE, "%s read_string: %s\n", __func__, data);
retval = RIG_OK;
}
@ -90,7 +90,7 @@ easycomm_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
{
char cmdstr[64];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __FUNCTION__, az, el);
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
if (rot->caps->rot_model == ROT_MODEL_EASYCOMM1) {
sprintf(cmdstr, "AZ%.1f EL%.1f UP000 XXX DN000 XXX\n", az, el);
@ -112,21 +112,21 @@ easycomm_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
char cmdstr[16], ackbuf[32];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
sprintf(cmdstr, "AZ EL \n");
retval = easycomm_transaction(rot, cmdstr, ackbuf, sizeof(ackbuf));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_TRACE, "%s got error: %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_TRACE, "%s got error: %d\n", __func__, retval);
return retval;
}
/* Parse parse string to extract AZ,EL values */
rig_debug(RIG_DEBUG_TRACE, "%s got response: %s\n", __FUNCTION__, ackbuf);
rig_debug(RIG_DEBUG_TRACE, "%s got response: %s\n", __func__, ackbuf);
retval = sscanf(ackbuf, "AZ%f EL%f", az, el);
if (retval != 2) {
rig_debug(RIG_DEBUG_ERR, "%s: unknown response (%s)\n", __FUNCTION__, ackbuf);
rig_debug(RIG_DEBUG_ERR, "%s: unknown response (%s)\n", __func__, ackbuf);
return -RIG_ERJCTED;
}
return RIG_OK;
@ -137,7 +137,7 @@ easycomm_rot_stop(ROT *rot)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
retval = easycomm_transaction(rot, "SA SE \n", NULL, 0);
if (retval != RIG_OK)
@ -152,7 +152,7 @@ static int
easycomm_rot_reset(ROT *rot, rot_reset_t rst)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
retval = easycomm_transaction(rot, "RESET\n", NULL, 0);
if (retval != RIG_OK) /* Custom command (not in Easycomm) */
@ -165,7 +165,7 @@ static int
easycomm_rot_park(ROT *rot)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
retval = easycomm_transaction(rot, "PARK\n", NULL, 0);
if (retval != RIG_OK) /* Custom command (not in Easycomm) */
@ -179,7 +179,7 @@ easycomm_rot_move(ROT *rot, int direction, int speed)
{
char cmdstr[24];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
/* For EasyComm 1/2/3 */
switch (direction) {
@ -196,7 +196,7 @@ easycomm_rot_move(ROT *rot, int direction, int speed)
sprintf(cmdstr, "MR\n");
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: Invalid direction value! (%d)\n", __FUNCTION__, direction);
rig_debug(RIG_DEBUG_ERR,"%s: Invalid direction value! (%d)\n", __func__, direction);
return -RIG_EINVAL;
}
@ -212,9 +212,9 @@ easycomm_rot_move_velocity(ROT *rot, int direction, int speed)
{
char cmdstr[24];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
if(speed<0 || speed>9999) {
rig_debug(RIG_DEBUG_ERR,"%s: Invalid speed value!(0-9999) (%d)\n", __FUNCTION__, speed);
rig_debug(RIG_DEBUG_ERR,"%s: Invalid speed value!(0-9999) (%d)\n", __func__, speed);
return -RIG_EINVAL;
}
@ -233,7 +233,7 @@ easycomm_rot_move_velocity(ROT *rot, int direction, int speed)
sprintf(cmdstr, "VR%04d\n", speed);
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: Invalid direction value! (%d)\n", __FUNCTION__, direction);
rig_debug(RIG_DEBUG_ERR,"%s: Invalid direction value! (%d)\n", __func__, direction);
return -RIG_EINVAL;
}
@ -309,12 +309,12 @@ static int easycomm_rot_get_conf(ROT *rot, token_t token, char *val) {
retval = easycomm_transaction(rot, cmdstr, ackbuf, sizeof(ackbuf));
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_TRACE, "%s got error: %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_TRACE, "%s got error: %d\n", __func__, retval);
return retval;
}
rig_debug(RIG_DEBUG_TRACE, "%s got response: %s\n", __FUNCTION__, ackbuf);
rig_debug(RIG_DEBUG_TRACE, "%s got response: %s\n", __func__, ackbuf);
/* Return given string at correct position*/
memcpy(val, ackbuf + 2, sizeof(ackbuf) - 2); /* CCxxxxxx */
return RIG_OK;
@ -349,7 +349,7 @@ static int easycomm_rot_set_conf(ROT *rot, token_t token, const char *val) {
retval = easycomm_transaction(rot, cmdstr, NULL, 0);
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_TRACE, "%s got error: %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_TRACE, "%s got error: %d\n", __func__, retval);
return retval;
}
return RIG_OK;
@ -491,7 +491,7 @@ const struct rot_caps easycomm3_rot_caps = {
DECLARE_INITROT_BACKEND(easycomm)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&easycomm1_rot_caps);
rot_register(&easycomm2_rot_caps);

Wyświetl plik

@ -708,7 +708,7 @@ int elad_set_vfo(RIG *rig, vfo_t vfo)
//if rig=ts2000 then check Satellite mode status
if(rig->caps->rig_model == RIG_MODEL_TS2000 && !priv->is_emulation) {
char retbuf[20];
rig_debug(RIG_DEBUG_VERBOSE, "%s: Checking Satellite mode status\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Checking Satellite mode status\n",__func__);
snprintf(cmdbuf, sizeof (cmdbuf), "SA");
retval = elad_transaction(rig, cmdbuf, retbuf, 20);
@ -3313,7 +3313,7 @@ DECLARE_PROBERIG_BACKEND(elad)
* reply should be something like 'K2n;'
*/
if (id_len == 4 || !strcmp(idbuf, "K2")) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: found K2\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: found K2\n",__func__);
if (cfunc)
(*cfunc)(port, RIG_MODEL_K2, data);
return RIG_MODEL_K2;

Wyświetl plik

@ -126,14 +126,14 @@ elad_fdm_duo_set_level (RIG * rig, vfo_t vfo, setting_t level, value_t val)
elad_val = 2;
break;
default:
rig_debug (RIG_DEBUG_ERR, "%s: Unsupported agc value",__FUNCTION__);
rig_debug (RIG_DEBUG_ERR, "%s: Unsupported agc value",__func__);
return -RIG_EINVAL;
};
sprintf (levelbuf, "GT%03d", elad_val);
break;
default:
rig_debug (RIG_DEBUG_ERR, "%s: Unsupported set_level %s", __FUNCTION__, rig_strlevel(level));
rig_debug (RIG_DEBUG_ERR, "%s: Unsupported set_level %s", __func__, rig_strlevel(level));
return -RIG_EINVAL;
}

Wyświetl plik

@ -49,23 +49,23 @@ static int ether_transaction(ROT *rot, char *cmd, int len, char *buf)
int ret;
ret = write_block(&rot->state.rotport, cmd, len);
rig_debug(RIG_DEBUG_VERBOSE, "function %s(1): ret=%d || send=%s\n",__FUNCTION__ , ret, cmd);
rig_debug(RIG_DEBUG_VERBOSE, "function %s(1): ret=%d || send=%s\n",__func__ , ret, cmd);
if (ret != RIG_OK)
return ret;
ret = read_string(&rot->state.rotport, buf, BUF_MAX, "\n", sizeof("\n"));
rig_debug(RIG_DEBUG_VERBOSE, "function %s(2): ret=%d || receive=%s\n",__FUNCTION__ , ret, buf);
rig_debug(RIG_DEBUG_VERBOSE, "function %s(2): ret=%d || receive=%s\n",__func__ , ret, buf);
if (ret < 0)
return ret;
if (!memcmp(buf, ROTORCTL_RET, strlen(ROTORCTL_RET))) {
rig_debug(RIG_DEBUG_VERBOSE, "function %s(2a): receive=%s\n",__FUNCTION__ , buf);
rig_debug(RIG_DEBUG_VERBOSE, "function %s(2a): receive=%s\n",__func__ , buf);
return RIG_OK;
}
if (!memcmp(buf, NETROTCTL_RET, strlen(NETROTCTL_RET))) {
int rv = atoi(buf+strlen(NETROTCTL_RET));
rig_debug(RIG_DEBUG_VERBOSE, "function %s(2): ret=%d || receive=%d\n",__FUNCTION__ , ret, rv);
rig_debug(RIG_DEBUG_VERBOSE, "function %s(2): ret=%d || receive=%d\n",__func__ , ret, rv);
return atoi(buf+strlen(NETROTCTL_RET));
}
@ -82,7 +82,7 @@ static int ether_rot_open(ROT *rot)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
/* elevation not need */
len = sprintf(cmd, "rotor state\n");
@ -104,7 +104,7 @@ static int ether_rot_open(ROT *rot)
static int ether_rot_close(ROT *rot)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
/* clean signoff, no read back */
write_block(&rot->state.rotport, "\n", 1);
@ -118,7 +118,7 @@ static int ether_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %f %f\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %f %f\n", __func__,
az, el);
len = sprintf(cmd, "rotor move %d %d\n", (int)az, (int)el);
@ -137,7 +137,7 @@ static int ether_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
char buf[BUF_MAX];
char mv[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "rotor status\n");
@ -164,7 +164,7 @@ static int ether_rot_stop(ROT *rot)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "rotor stop\n");
@ -185,7 +185,7 @@ static int ether_rot_park(ROT *rot)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
len = sprintf(cmd, "rotor park\n");
@ -202,7 +202,7 @@ static int ether_rot_reset(ROT *rot, rot_reset_t reset)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
// orig len = sprintf(cmd, "R %d\n", reset);
len = sprintf(cmd, "reset\n");
@ -224,7 +224,7 @@ static int ether_rot_move(ROT *rot, int direction, int speed)
char cmd[CMD_MAX];
char buf[BUF_MAX];
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
if (direction == 0)
len = sprintf(cmd, "rotor cw %d\n", speed);

Wyświetl plik

@ -426,7 +426,7 @@ int dttsp_init(RIG *rig)
return -RIG_ENOMEM;
rig->state.priv = (void*)priv;
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __FUNCTION__ );
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__ );
priv->tuner = NULL;
priv->tuner_model = RIG_MODEL_DUMMY;
@ -458,7 +458,7 @@ int dttsp_open(RIG *rig)
char *meterpath;
rig_debug(RIG_DEBUG_TRACE,"%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE,"%s called\n", __func__);
/*
* prevent l8ps
@ -542,7 +542,7 @@ int dttsp_close(RIG *rig)
{
struct dttsp_priv_data *priv = (struct dttsp_priv_data*)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
port_close(&priv->meter_port, priv->meter_port.type.rig);
rig_close(priv->tuner);
@ -554,7 +554,7 @@ int dttsp_cleanup(RIG *rig)
{
struct dttsp_priv_data *priv = (struct dttsp_priv_data*)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
if (priv->tuner)
rig_cleanup(priv->tuner);
@ -587,7 +587,7 @@ int dttsp_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
sprintf_freq(fstr, freq);
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n",
__FUNCTION__, rig_strvfo(vfo), fstr);
__func__, rig_strvfo(vfo), fstr);
ret = rig_get_freq(priv->tuner, RIG_VFO_CURR, &tuner_freq);
if (ret != RIG_OK)
@ -613,7 +613,7 @@ int dttsp_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
sprintf_freq(fstr, tuner_freq);
rig_debug(RIG_DEBUG_TRACE,"%s: tuner=%s, rx_delta=%d Hz\n",
__FUNCTION__, fstr, priv->rx_delta_f);
__func__, fstr, priv->rx_delta_f);
/* setRxFrequenc */
buf_len = sprintf (buf, "setOsc %d\n", priv->rx_delta_f );
@ -633,7 +633,7 @@ int dttsp_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
if (ret != RIG_OK)
return ret;
rig_debug(RIG_DEBUG_TRACE,"%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE,"%s called\n", __func__);
*freq = tuner_freq - priv->rx_delta_f;
@ -668,7 +668,7 @@ int dttsp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
ret = send_command (rig, buf, buf_len);
rig_debug(RIG_DEBUG_VERBOSE,"%s: %s\n",
__FUNCTION__, buf);
__func__, buf);
if (ret != RIG_OK || RIG_PASSBAND_NOCHANGE == width) return ret;
@ -676,7 +676,7 @@ int dttsp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
width = rig_passband_normal(rig, mode);
sprintf_freq(buf, width);
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s %s\n",
__FUNCTION__, rig_strrmode(mode), buf);
__func__, rig_strrmode(mode), buf);
switch (mode) {
case RIG_MODE_USB:
@ -706,7 +706,7 @@ int dttsp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
ret = send_command (rig, buf, buf_len);
rig_debug(RIG_DEBUG_VERBOSE,"%s: %s\n",
__FUNCTION__, buf);
__func__, buf);
return ret;
}
@ -740,7 +740,7 @@ int dttsp_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
break;
default:
rig_debug(RIG_DEBUG_TRACE, "%s: level %s, try tuner\n",
__FUNCTION__, rig_strlevel(level));
__func__, rig_strlevel(level));
return rig_set_level(priv->tuner, vfo, level, val);
}
@ -756,7 +756,7 @@ int dttsp_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
char buf[32];
float rxm[MAXRX][RXMETERPTS];
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s\n",__FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s\n",__func__,
rig_strlevel(level));
switch (level) {
@ -779,7 +779,7 @@ int dttsp_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
break;
default:
rig_debug(RIG_DEBUG_TRACE, "%s: level %s, try tuner\n",
__FUNCTION__, rig_strlevel(level));
__func__, rig_strlevel(level));
return rig_get_level(priv->tuner, vfo, level, val);
}
@ -812,7 +812,7 @@ int dttsp_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
break;
default:
rig_debug(RIG_DEBUG_TRACE, "%s: func %s, try tuner\n",
__FUNCTION__, rig_strfunc(func));
__func__, rig_strfunc(func));
return rig_set_func(priv->tuner, vfo, func, status);
}
@ -828,7 +828,7 @@ int dttsp_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
*/
int dttsp_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return -RIG_ENIMPL;
@ -837,7 +837,7 @@ int dttsp_set_rit(RIG *rig, vfo_t vfo, shortfreq_t rit)
int dttsp_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return -RIG_ENIMPL;
}
@ -848,7 +848,7 @@ int dttsp_set_ant(RIG * rig, vfo_t vfo, ant_t ant)
struct dttsp_priv_data *priv = (struct dttsp_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_TRACE, "%s: ant %d, try tuner\n",
__FUNCTION__, ant);
__func__, ant);
return rig_set_ant(priv->tuner, vfo, ant);
}

Wyświetl plik

@ -34,7 +34,7 @@
DECLARE_INITRIG_BACKEND(flexradio)
{
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
rig_register(&sdr1k_rig_caps);
//rig_register(&sdr1krfe_rig_caps);

Wyświetl plik

@ -263,7 +263,7 @@ static int set_band(RIG *rig, freq_t freq)
ret = write_latch (rig, L_BAND, 1 << band, 0x3f);
rig_debug(RIG_DEBUG_VERBOSE, "%s %"PRIll" band %d\n", __FUNCTION__, (int64_t)freq, band);
rig_debug(RIG_DEBUG_VERBOSE, "%s %"PRIll" band %d\n", __func__, (int64_t)freq, band);
return ret;
}
@ -290,14 +290,14 @@ int sdr1k_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
* DDS steps = 3051.7578125Hz
*/
DDS_step_size = ((double)priv->xtal * priv->pll_mult ) / 65536;
rig_debug(RIG_DEBUG_VERBOSE, "%s DDS step size %g %g %g\n", __FUNCTION__, DDS_step_size, (double)freq / DDS_step_size,
rig_debug(RIG_DEBUG_VERBOSE, "%s DDS step size %g %g %g\n", __func__, DDS_step_size, (double)freq / DDS_step_size,
rint((double)freq / DDS_step_size));
if (spur_red)
frqval = (freq_t) (DDS_step_size * rint((double)freq / DDS_step_size));
else
frqval = freq;
rig_debug(RIG_DEBUG_VERBOSE, "%s curr %"PRIll" frqval %"PRIll"\n", __FUNCTION__, (int64_t)freq, (int64_t)frqval);
rig_debug(RIG_DEBUG_VERBOSE, "%s curr %"PRIll" frqval %"PRIll"\n", __func__, (int64_t)freq, (int64_t)frqval);
if (priv->dds_freq == frqval) {
return RIG_OK;
@ -334,7 +334,7 @@ int sdr1k_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
struct sdr1k_priv_data *priv = (struct sdr1k_priv_data *)rig->state.priv;
*freq = priv->dds_freq;
rig_debug(RIG_DEBUG_TRACE,"%s: %"PRIll"\n", __FUNCTION__, (int64_t)priv->dds_freq);
rig_debug(RIG_DEBUG_TRACE,"%s: %"PRIll"\n", __func__, (int64_t)priv->dds_freq);
return RIG_OK;
}
@ -385,7 +385,7 @@ int sdr1k_set_ptt (RIG *rig, vfo_t vfo, ptt_t ptt)
int sdr1k_set_level (RIG *rig, vfo_t vfo, setting_t level, value_t val)
{
rig_debug(RIG_DEBUG_TRACE,"%s: %s %d\n", __FUNCTION__, rig_strlevel(level), val.i);
rig_debug(RIG_DEBUG_TRACE,"%s: %s %d\n", __func__, rig_strlevel(level), val.i);
switch (level) {
case RIG_LEVEL_PREAMP:

Wyświetl plik

@ -90,7 +90,7 @@ fodtrack_set_position(ROT *rot, azimuth_t az, elevation_t el)
int retval;
hamlib_port_t *pport;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __FUNCTION__, az, el);
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
pport = &rot->state.rotport;
@ -143,7 +143,7 @@ const struct rot_caps fodtrack_rot_caps = {
DECLARE_INITROT_BACKEND(fodtrack)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&fodtrack_rot_caps);

Wyświetl plik

@ -95,7 +95,7 @@ transaction_write:
#if 0
/* Check that command termination is correct */
if (strchr(REPLY_EOM, data[strlen(data)-1])==NULL) {
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n", __FUNCTION__, data);
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n", __func__, data);
if (retry_read++ < rig->state.rotport.retry)
goto transaction_write;
retval = -RIG_EPROTO;
@ -106,7 +106,7 @@ transaction_write:
if (data[0] == '?') {
/* Invalid command */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Error for '%s': '%s'\n",
__FUNCTION__, cmdstr, data);
__func__, cmdstr, data);
retval = -RIG_EPROTO;
goto transaction_quit;
}
@ -136,7 +136,7 @@ gs232_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
int retval;
unsigned u_az, u_el;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __FUNCTION__, az, el);
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
if (az < 0.0){
az = az + 360.0;
}
@ -158,7 +158,7 @@ gs232_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
char posbuf[32];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
retval = gs232_transaction(rot, "C2" EOM, posbuf, sizeof(posbuf));
if (retval != RIG_OK || strlen(posbuf) < 10)
@ -166,16 +166,16 @@ gs232_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
/* parse */
if (sscanf(posbuf+2, "%f", az) != 1) {
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __FUNCTION__, posbuf);
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __func__, posbuf);
return -RIG_EPROTO;
}
if (sscanf(posbuf+7, "%f", el) != 1) {
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __FUNCTION__, posbuf);
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __func__, posbuf);
return -RIG_EPROTO;
}
rig_debug(RIG_DEBUG_TRACE, "%s: (az, el) = (%.1f, %.1f)\n",
__FUNCTION__, *az, *el);
__func__, *az, *el);
return RIG_OK;
}
@ -185,7 +185,7 @@ gs232_rot_stop(ROT *rot)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
/* All Stop */
retval = gs232_wo_transaction(rot, "S" EOM, NULL, 0);

Wyświetl plik

@ -116,7 +116,7 @@ transaction_write:
if (strchr(REPLY_EOM, data[strlen(data) - 1]) == NULL)
{
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n",
__FUNCTION__, data);
__func__, data);
if (retry_read++ < rig->state.rotport.retry)
{
@ -133,7 +133,7 @@ transaction_write:
{
/* Invalid command */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Error for '%s': '%s'\n",
__FUNCTION__, cmdstr, data);
__func__, cmdstr, data);
retval = -RIG_EPROTO;
goto transaction_quit;
}
@ -151,7 +151,7 @@ gs232a_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
int retval;
unsigned u_az, u_el;
rig_debug(RIG_DEBUG_TRACE, "%s called: %.02f %.02f\n", __FUNCTION__, az, el);
rig_debug(RIG_DEBUG_TRACE, "%s called: %.02f %.02f\n", __func__, az, el);
if (az < 0.0)
{
@ -178,7 +178,7 @@ gs232a_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
char posbuf[32];
int retval, angle;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
retval = gs232a_transaction(rot, "C2" EOM, posbuf, sizeof(posbuf), 0);
@ -190,7 +190,7 @@ gs232a_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
/* parse "+0aaa+0eee" */
if (sscanf(posbuf + 2, "%d", &angle) != 1)
{
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __FUNCTION__, posbuf);
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __func__, posbuf);
return -RIG_EPROTO;
}
@ -198,14 +198,14 @@ gs232a_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
if (sscanf(posbuf + 7, "%d", &angle) != 1)
{
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __FUNCTION__, posbuf);
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __func__, posbuf);
return -RIG_EPROTO;
}
*el = (elevation_t)angle;
rig_debug(RIG_DEBUG_TRACE, "%s: (az, el) = (%.1f, %.1f)\n",
__FUNCTION__, *az, *el);
__func__, *az, *el);
return RIG_OK;
}
@ -215,7 +215,7 @@ gs232a_rot_stop(ROT *rot)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
/* All Stop */
retval = gs232a_transaction(rot, "S" EOM, NULL, 0, 0);
@ -236,7 +236,7 @@ gs232a_rot_move(ROT *rot, int direction, int speed)
int retval;
unsigned x_speed;
rig_debug(RIG_DEBUG_TRACE, "%s called %d %d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s called %d %d\n", __func__,
direction, speed);
x_speed = (3 * speed) / 100 + 1;
@ -270,7 +270,7 @@ gs232a_rot_move(ROT *rot, int direction, int speed)
default:
rig_debug(RIG_DEBUG_ERR, "%s: Invalid direction value! (%d)\n",
__FUNCTION__, direction);
__func__, direction);
return -RIG_EINVAL;
}
@ -402,7 +402,7 @@ const struct rot_caps gs232a_rot_caps =
DECLARE_INITROT_BACKEND(gs232a)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&gs232a_rot_caps);
rot_register(&gs232_generic_rot_caps);

Wyświetl plik

@ -123,7 +123,7 @@ transaction_write:
{
rig_debug(RIG_DEBUG_ERR,
"%s: Command is not correctly terminated '%s'\n",
__FUNCTION__, data);
__func__, data);
if (retry_read++ < rig->state.rotport.retry)
{
@ -143,7 +143,7 @@ transaction_write:
{
rig_debug(RIG_DEBUG_VERBOSE,
"%s: Expected '?>' but got '%s' from cmd '%s'\n",
__FUNCTION__, data, cmdstr);
__func__, data, cmdstr);
return -RIG_EPROTO;
}
@ -151,7 +151,7 @@ transaction_write:
{
/* Invalid command */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Error for '%s': '%s'\n",
__FUNCTION__, cmdstr, data);
__func__, cmdstr, data);
retval = -RIG_EPROTO;
goto transaction_quit;
}
@ -170,7 +170,7 @@ gs232b_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
int retval;
unsigned u_az, u_el;
rig_debug(RIG_DEBUG_TRACE, "%s called: az=%.02f el=%.02f\n", __FUNCTION__, az,
rig_debug(RIG_DEBUG_TRACE, "%s called: az=%.02f el=%.02f\n", __func__, az,
el);
if (az < 0.0)
@ -198,7 +198,7 @@ gs232b_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
char posbuf[32];
int retval, int_az, int_el;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
retval = gs232b_transaction(rot, "C2" EOM, posbuf, sizeof(posbuf), 0);
@ -214,7 +214,7 @@ gs232b_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
*/
if (sscanf(posbuf, "AZ=%d EL=%d", &int_az, &int_el) != 2)
{
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s'\n", __func__,
posbuf);
return -RIG_EPROTO;
}
@ -223,7 +223,7 @@ gs232b_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
*el = (elevation_t) int_el;
rig_debug(RIG_DEBUG_TRACE, "%s: (az, el) = (%.0f, %.0f)\n",
__FUNCTION__, *az, *el);
__func__, *az, *el);
return RIG_OK;
}
@ -234,7 +234,7 @@ gs232b_rot_stop(ROT *rot)
char buf[32];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
/* All Stop */
retval = gs232b_transaction(rot, "S" EOM, buf, sizeof(buf), 0);
@ -255,7 +255,7 @@ gs232b_rot_move(ROT *rot, int direction, int speed)
int retval;
unsigned x_speed;
rig_debug(RIG_DEBUG_TRACE, "%s called %d %d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE, "%s called %d %d\n", __func__,
direction, speed);
x_speed = (3 * speed) / 100 + 1;
@ -289,7 +289,7 @@ gs232b_rot_move(ROT *rot, int direction, int speed)
default:
rig_debug(RIG_DEBUG_ERR, "%s: Invalid direction value! (%d)\n",
__FUNCTION__, direction);
__func__, direction);
return -RIG_EINVAL;
}

Wyświetl plik

@ -290,7 +290,7 @@ int icm710_open(RIG *rig)
int retval = icmarine_transaction(rig, "REMOTE", "ON", NULL);
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig not responding? %s\n", __FUNCTION__, rigerror(retval));
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig not responding? %s\n", __func__, rigerror(retval));
}
@ -302,7 +302,7 @@ int icm710_close(RIG *rig)
int retval = icmarine_transaction(rig, "REMOTE", "OFF", NULL);
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig not responding? %s\n", __FUNCTION__, rigerror(retval));
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig not responding? %s\n", __func__, rigerror(retval));
}

Wyświetl plik

@ -158,10 +158,10 @@ int icmarine_cleanup(RIG *rig)
int icmarine_open(RIG *rig)
{
char respbuf[BUFSZ+1];
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE,"%s called\n", __func__);
int retval = icmarine_transaction(rig, "REMOTE", "ON", respbuf);
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig not responding? %s\n",__FUNCTION__, rigerror(retval));
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig not responding? %s\n",__func__, rigerror(retval));
}
return RIG_OK;
@ -220,7 +220,7 @@ int icmarine_transaction(RIG *rig, const char *cmd, const char *param, char *res
int cmd_len = 0;
unsigned csum = 0;
rig_debug(RIG_DEBUG_TRACE, "%s: cmd='%s', param=%s\n",__FUNCTION__,cmd,param);
rig_debug(RIG_DEBUG_TRACE, "%s: cmd='%s', param=%s\n",__func__,cmd,param);
rs = &rig->state;
priv = (struct icmarine_priv_data *)rs->priv;
@ -278,7 +278,7 @@ int icmarine_transaction(RIG *rig, const char *cmd, const char *param, char *res
*strip = 0;
}
else {
rig_debug(RIG_DEBUG_ERR, "%s: checksum not in response? response='%s'\n",__FUNCTION__,respbuf);
rig_debug(RIG_DEBUG_ERR, "%s: checksum not in response? response='%s'\n",__func__,respbuf);
return -RIG_EPROTO;
}
p = strrchr(respbuf, ',');
@ -287,7 +287,7 @@ int icmarine_transaction(RIG *rig, const char *cmd, const char *param, char *res
else
return -RIG_EPROTO;
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning response='%s'\n", __FUNCTION__,response);
rig_debug(RIG_DEBUG_VERBOSE, "%s: returning response='%s'\n", __func__,response);
return RIG_OK;
}
@ -297,7 +297,7 @@ int icmarine_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
char freqbuf[BUFSZ];
struct icmarine_priv_data *priv;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
priv = (struct icmarine_priv_data*)rig->state.priv;
@ -320,7 +320,7 @@ int icmarine_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
char freqbuf[BUFSZ] = "";
double d;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
retval = icmarine_transaction (rig, CMD_RXFREQ, NULL, freqbuf);
if (retval != RIG_OK)
@ -330,7 +330,7 @@ int icmarine_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
*freq = 0;
} else {
if (sscanf(freqbuf, "%lf", &d) != 1) {
rig_debug(RIG_DEBUG_ERR,"%s: sscanf('%s') failed\n",__FUNCTION__,freqbuf);
rig_debug(RIG_DEBUG_ERR,"%s: sscanf('%s') failed\n",__func__,freqbuf);
return -RIG_EPROTO;
}
@ -344,7 +344,7 @@ int icmarine_set_tx_freq(RIG *rig, vfo_t vfo, freq_t freq)
{
char freqbuf[BUFSZ];
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
sprintf(freqbuf, "%.6f", freq/MHz(1));
@ -357,7 +357,7 @@ int icmarine_get_tx_freq(RIG *rig, vfo_t vfo, freq_t *freq)
char freqbuf[BUFSZ] = "";
double d;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
retval = icmarine_transaction (rig, CMD_TXFREQ, NULL, freqbuf);
if (retval != RIG_OK)
@ -379,7 +379,7 @@ int icmarine_set_split_vfo(RIG *rig, vfo_t rx_vfo, split_t split, vfo_t tx_vfo)
{
struct icmarine_priv_data *priv;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
priv = (struct icmarine_priv_data *)rig->state.priv;
@ -401,7 +401,7 @@ int icmarine_get_split_vfo(RIG *rig, vfo_t rx_vfo, split_t *split, vfo_t *tx_vfo
{
struct icmarine_priv_data *priv;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
priv = (struct icmarine_priv_data *)rig->state.priv;
@ -416,7 +416,7 @@ int icmarine_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{
const char *pmode;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
switch (mode) {
case RIG_MODE_CW: pmode = MD_CW; break;
@ -439,7 +439,7 @@ int icmarine_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
int retval;
char modebuf[BUFSZ];
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
retval = icmarine_transaction (rig, CMD_MODE, NULL, modebuf);
if (retval != RIG_OK)
@ -469,12 +469,12 @@ int icmarine_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
*/
int icmarine_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
{
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
int retval = icmarine_transaction (rig, CMD_PTT,
ptt == RIG_PTT_ON ? "TX" : "RX", NULL);
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: transaction failed\n",__FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: transaction failed\n",__func__);
return retval;
}
return RIG_OK;
@ -485,12 +485,12 @@ int icmarine_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
char pttbuf[BUFSZ];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
retval = icmarine_transaction (rig, CMD_PTT, NULL, pttbuf);
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR, "%s: transaction failed\n",__FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: transaction failed\n",__func__);
return retval;
}
@ -499,7 +499,7 @@ int icmarine_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
else if (strncmp(pttbuf, "RX",2)==0)
*ptt = RIG_PTT_OFF;
else {
rig_debug(RIG_DEBUG_ERR, "%s: invalid pttbuf='%s'\n",__FUNCTION__,pttbuf);
rig_debug(RIG_DEBUG_ERR, "%s: invalid pttbuf='%s'\n",__func__,pttbuf);
retval = -RIG_EPROTO;
}
@ -511,7 +511,7 @@ int icmarine_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
char dcdbuf[BUFSZ];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
retval = icmarine_transaction (rig, CMD_SQLS, NULL, dcdbuf);
@ -530,7 +530,7 @@ int icmarine_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
int icmarine_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op)
{
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
if (RIG_OP_TUNE != op && RIG_OP_NONE != op)
return -RIG_EINVAL;
@ -543,7 +543,7 @@ int icmarine_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
{
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
switch(func) {
case RIG_FUNC_NB:
@ -562,7 +562,7 @@ int icmarine_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
char funcbuf[BUFSZ];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
switch(func) {
case RIG_FUNC_NB:
@ -584,7 +584,7 @@ int icmarine_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
char lvlbuf[BUFSZ];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
switch(level) {
case RIG_LEVEL_AF:
@ -619,7 +619,7 @@ int icmarine_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
char lvlbuf[BUFSZ];
int retval;
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s:\n",__func__);
switch(level) {
case RIG_LEVEL_RAWSTR:

Wyświetl plik

@ -347,7 +347,7 @@ int rig2icom_mode(RIG *rig, rmode_t mode, pbwidth_t width,
case RIG_MODE_DCR: icmode = S_DCR; break;
case RIG_MODE_DD: icmode = S_DD; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported Hamlib mode %s\n",__FUNCTION__,rig_strrmode(mode));
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported Hamlib mode %s\n",__func__,rig_strrmode(mode));
return -RIG_EINVAL;
}

Wyświetl plik

@ -609,7 +609,7 @@ static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val)
if (ack_len != 1 || ackbuf[0] != ACK) {
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), "
"len=%d\n", __FUNCTION__, ackbuf[0], ack_len);
"len=%d\n", __func__, ackbuf[0], ack_len);
return -RIG_ERJCTED;
}
return RIG_OK;
@ -660,12 +660,12 @@ static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val)
if (resbuf[0] != ep_cmd) {
if (resbuf[0] == ACK) {
rig_debug(RIG_DEBUG_ERR,"%s: protocol error (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_EPROTO;
}
else {
rig_debug(RIG_DEBUG_ERR,"%s: ack NG (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_ERJCTED;
}
}
@ -683,12 +683,12 @@ static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: protocol error (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_EPROTO;
}
rig_debug(RIG_DEBUG_TRACE,"%s: %d %d %d %f\n",
__FUNCTION__, res_len, icom_val, val->i, val->f);
__func__, res_len, icom_val, val->i, val->f);
return RIG_OK;
}
@ -800,12 +800,12 @@ int ic746_get_parm(RIG *rig, setting_t parm, value_t *val)
if (resbuf[0] != prm_cn) {
if (resbuf[0] == ACK) {
rig_debug(RIG_DEBUG_ERR,"%s: protocol error (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_EPROTO;
}
else {
rig_debug(RIG_DEBUG_ERR,"%s: ack NG (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_ERJCTED;
}
}
@ -817,7 +817,7 @@ int ic746_get_parm(RIG *rig, setting_t parm, value_t *val)
val->i = icom_val;
rig_debug(RIG_DEBUG_TRACE,"%s: %d %d %d %f\n",
__FUNCTION__, res_len, icom_val, val->i, val->f);
__func__, res_len, icom_val, val->i, val->f);
return RIG_OK;
}

Wyświetl plik

@ -705,7 +705,7 @@ static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val)
if (ack_len != 1 || ackbuf[0] != ACK) {
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), "
"len=%d\n", __FUNCTION__, ackbuf[0], ack_len);
"len=%d\n", __func__, ackbuf[0], ack_len);
return -RIG_ERJCTED;
}
return RIG_OK;
@ -762,12 +762,12 @@ static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val)
if (resbuf[0] != ep_cmd) {
if (resbuf[0] == ACK) {
rig_debug(RIG_DEBUG_ERR,"%s: protocol error (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_EPROTO;
}
else {
rig_debug(RIG_DEBUG_ERR,"%s: ack NG (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_ERJCTED;
}
}
@ -785,12 +785,12 @@ static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: protocol error (%#.2x), "
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
"len=%d\n", __func__,resbuf[0],res_len);
return -RIG_EPROTO;
}
rig_debug(RIG_DEBUG_TRACE,"%s: %d %d %d %f\n",
__FUNCTION__, res_len, icom_val, val->i, val->f);
__func__, res_len, icom_val, val->i, val->f);
return RIG_OK;
}

Wyświetl plik

@ -533,7 +533,7 @@ int icom_init(RIG *rig)
priv->tx_vfo = RIG_VFO_NONE;
priv->rx_vfo = RIG_VFO_NONE;
priv->curr_vfo = RIG_VFO_NONE;
rig_debug(RIG_DEBUG_TRACE, "%s: done\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s: done\n", __func__);
return RIG_OK;
}
@ -586,7 +586,7 @@ int icom_rig_open(RIG *rig)
if (retval == RIG_OK)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: USB echo on detected\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: USB echo on detected\n",__func__);
return RIG_OK;
}
@ -595,7 +595,7 @@ int icom_rig_open(RIG *rig)
if (retval == RIG_OK)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: USB echo off detected\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: USB echo off detected\n",__func__);
return RIG_OK;
}
}
@ -720,7 +720,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
// Pick the appropriate VFO when VFO_TX is requested
if (vfo == RIG_VFO_TX)
{
rig_debug(RIG_DEBUG_TRACE,"%s: VFO_TX requested, vfo=%s\n",__FUNCTION__,rig_strvfo(vfo));
rig_debug(RIG_DEBUG_TRACE,"%s: VFO_TX requested, vfo=%s\n",__func__,rig_strvfo(vfo));
if (priv->split_on)
{
vfo = rig->state.vfo_list & RIG_VFO_B ? RIG_VFO_B : RIG_VFO_SUB;
@ -735,7 +735,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
// Pick the appropriate VFO when VFO_RX is requested
if (vfo == RIG_VFO_RX)
{
rig_debug(RIG_DEBUG_TRACE,"%s: VFO_RX requested, vfo=%s\n",__FUNCTION__,rig_strvfo(vfo));
rig_debug(RIG_DEBUG_TRACE,"%s: VFO_RX requested, vfo=%s\n",__func__,rig_strvfo(vfo));
vfo = rig->state.vfo_list & RIG_VFO_B ? RIG_VFO_A : RIG_VFO_MAIN;
}
@ -957,7 +957,7 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
if (retval != RIG_OK)
{
rig_debug(RIG_DEBUG_ERR, "%s: protocol error (%#.2x), "
"len=%d\n", __FUNCTION__, resbuf[0], res_len);
"len=%d\n", __func__, resbuf[0], res_len);
return 0; /* use default */
}
@ -1043,14 +1043,14 @@ int icom_set_dsp_flt(RIG *rig, rmode_t mode, pbwidth_t width)
if (retval != RIG_OK)
{
rig_debug(RIG_DEBUG_ERR, "%s: protocol error (%#.2x), "
"len=%d\n", __FUNCTION__, ackbuf[0], ack_len);
"len=%d\n", __func__, ackbuf[0], ack_len);
return retval;
}
if (ack_len != 1 || ackbuf[0] != ACK)
{
rig_debug(RIG_DEBUG_ERR, "%s: command not supported ? (%#.2x), "
"len=%d\n", __FUNCTION__, ackbuf[0], ack_len);
"len=%d\n", __func__, ackbuf[0], ack_len);
return retval;
}
@ -1121,7 +1121,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (retval != RIG_OK)
{
rig_debug(RIG_DEBUG_ERR, "%s: protocol error (%#.2x), len=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: protocol error (%#.2x), len=%d\n", __func__,
ackbuf[0], ack_len);
}
else
@ -1129,7 +1129,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (ack_len != 1 || ackbuf[0] != ACK)
{
rig_debug(RIG_DEBUG_ERR, "%s: command not supported ? (%#.2x), len=%d\n",
__FUNCTION__, ackbuf[0], ack_len);
__func__, ackbuf[0], ack_len);
}
}
}
@ -1250,7 +1250,7 @@ int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode,
if (retval != RIG_OK)
{
rig_debug(RIG_DEBUG_ERR, "%s: protocol error (%#.2x), len=%d\n", __FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: protocol error (%#.2x), len=%d\n", __func__,
databuf[0], data_len);
return -RIG_ERJCTED;
}
@ -1270,7 +1270,7 @@ int icom_get_mode_with_data(RIG *rig, vfo_t vfo, rmode_t *mode,
which is filter preset
number, whatever it is we
ignore it */
rig_debug(RIG_DEBUG_ERR, "%s: wrong frame len=%d\n", __FUNCTION__, data_len);
rig_debug(RIG_DEBUG_ERR, "%s: wrong frame len=%d\n", __func__, data_len);
return -RIG_ERJCTED;
}
@ -1403,7 +1403,7 @@ int icom_get_vfo(RIG *rig, vfo_t *vfo)
if (ack_len != 3)
{
rig_debug(RIG_DEBUG_ERR, "%s wrong frame len=%d\n", __FUNCTION__, ack_len);
rig_debug(RIG_DEBUG_ERR, "%s wrong frame len=%d\n", __func__, ack_len);
return -RIG_ERJCTED;
}
@ -3239,7 +3239,7 @@ int icom_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: Unsupported split %d", __FUNCTION__, split);
rig_debug(RIG_DEBUG_ERR, "%s: Unsupported split %d", __func__, split);
return -RIG_EINVAL;
}
@ -3286,7 +3286,7 @@ int icom_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
if (split_len != 1)
{
rig_debug(RIG_DEBUG_ERR, "%s: wrong frame len=%d\n",
__FUNCTION__, split_len);
__func__, split_len);
return -RIG_ERJCTED;
}
@ -4777,7 +4777,7 @@ int icom_decode_event(RIG *rig)
if (frm_len == -RIG_ETIMEOUT)
{
rig_debug(RIG_DEBUG_VERBOSE,
"%s: icom_decode got a timeout before the first character\n",__FUNCTION__);
"%s: icom_decode got a timeout before the first character\n",__func__);
}
if (frm_len < 0)
@ -4788,7 +4788,7 @@ int icom_decode_event(RIG *rig)
switch (buf[frm_len - 1])
{
case COL:
rig_debug(RIG_DEBUG_VERBOSE, "%s: icom_decode saw a collision\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: icom_decode saw a collision\n",__func__);
/* Collision */
return -RIG_BUSBUSY;
@ -5260,7 +5260,7 @@ DECLARE_PROBERIG_BACKEND(icom)
rig_debug(RIG_DEBUG_VERBOSE,
"%s, found OptoScan%c%c%c, software version %d.%d, "
"interface version %d.%d, at %#x\n",
__FUNCTION__,
__func__,
buf[2], buf[3], buf[4],
buf[5] >> 4, buf[5] & 0xf,
buf[6] >> 4, buf[6] & 0xf,
@ -5307,7 +5307,7 @@ DECLARE_PROBERIG_BACKEND(icom)
*/
DECLARE_INITRIG_BACKEND(icom)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n",__FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: _init called\n",__func__);
rig_register(&ic703_caps);
rig_register(&ic706_caps);

Wyświetl plik

@ -518,7 +518,7 @@ int icr75_get_parm(RIG *rig, setting_t parm, value_t *val)
res_len -= cmdhead;
if (resbuf[0] != ACK && resbuf[0] != prm_cn) {
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n", __FUNCTION__, resbuf[0], res_len);
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n", __func__, resbuf[0], res_len);
return -RIG_ERJCTED;
}
@ -546,7 +546,7 @@ int icr75_get_parm(RIG *rig, setting_t parm, value_t *val)
break;
}
rig_debug(RIG_DEBUG_TRACE, "%s: %d %d %d %f\n", __FUNCTION__, res_len, icom_val, val->i, val->f);
rig_debug(RIG_DEBUG_TRACE, "%s: %d %d %d %f\n", __func__, res_len, icom_val, val->i, val->f);
return RIG_OK;
}

Wyświetl plik

@ -260,9 +260,9 @@ int optoscan_recv_dtmf(RIG *rig, vfo_t vfo, char *digits, int *length)
digits[digitpos] = 0;
if (*length > 0) {
rig_debug(RIG_DEBUG_ERR, "%s: %d digits - %s\n",__FUNCTION__, *length, digits);
rig_debug(RIG_DEBUG_ERR, "%s: %d digits - %s\n",__func__, *length, digits);
} else {
rig_debug(RIG_DEBUG_ERR, "%s: no digits to read.\n",__FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: no digits to read.\n",__func__);
}
return RIG_OK;
@ -320,7 +320,7 @@ int optoscan_set_ext_parm(RIG *rig, token_t token, value_t val)
if (ack_len != 1 || ackbuf[0] != ACK) {
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), "
"len=%d\n", __FUNCTION__, ackbuf[0], ack_len);
"len=%d\n", __func__, ackbuf[0], ack_len);
return -RIG_ERJCTED;
}
@ -630,13 +630,13 @@ static int optoscan_get_status_block(RIG *rig, struct optostat *status_block)
break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unknown rig model",__FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: unknown rig model",__func__);
return -RIG_ERJCTED;
break;
}
if (ack_len != expected_len) {
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n",__FUNCTION__,
rig_debug(RIG_DEBUG_ERR, "%s: ack NG (%#.2x), len=%d\n",__func__,
ackbuf[0], ack_len);
return -RIG_ERJCTED;
}

Wyświetl plik

@ -322,7 +322,7 @@ int x108g_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
/* X108G doesn't quite follow ICOM protocol -- returns 0x1c instead of 0xfb */
if (ack_len !=3 || ackbuf[0] != 0x1c) {
rig_debug(RIG_DEBUG_ERR,"%s: ack NG (%#.2x), len=%d, ptt=%d\n",__FUNCTION__, ackbuf[0],ack_len,ptt);
rig_debug(RIG_DEBUG_ERR,"%s: ack NG (%#.2x), len=%d, ptt=%d\n",__func__, ackbuf[0],ack_len,ptt);
return -RIG_ERJCTED;
}
@ -357,7 +357,7 @@ static int x108g_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
}
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported split %d", __FUNCTION__, split);
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported split %d", __func__, split);
return -RIG_EINVAL;
}

Wyświetl plik

@ -338,7 +338,7 @@ const struct rot_caps ioptron_rot_caps =
DECLARE_INITROT_BACKEND(ioptron)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&ioptron_rot_caps);

Wyświetl plik

@ -122,7 +122,7 @@ static int jrc2rig_mode(RIG *rig, char jmode, char jwidth,
default:
rig_debug(RIG_DEBUG_ERR,
"%s: unsupported mode %c\n",
__FUNCTION__, jmode);
__func__, jmode);
*mode = RIG_MODE_NONE;
return -RIG_EINVAL;
}
@ -146,7 +146,7 @@ static int jrc2rig_mode(RIG *rig, char jmode, char jwidth,
default:
rig_debug(RIG_DEBUG_ERR,
"%s: unsupported width %c\n",
__FUNCTION__, jwidth);
__func__, jwidth);
*width = RIG_PASSBAND_NORMAL;
return -RIG_EINVAL;
}
@ -171,7 +171,7 @@ static int rig2jrc_mode(RIG *rig, rmode_t mode, pbwidth_t width,
case RIG_MODE_WFM: *jmode = MD_WFM; break;
default:
rig_debug(RIG_DEBUG_ERR,
"%s: unsupported mode %s\n", __FUNCTION__, rig_strrmode(mode));
"%s: unsupported mode %s\n", __func__, rig_strrmode(mode));
return -RIG_EINVAL;
}

Wyświetl plik

@ -169,7 +169,7 @@ const struct rig_caps xg3_caps = {
*/
int xg3_init(RIG * rig)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
struct xg3_priv_data *priv;
int i;

Wyświetl plik

@ -332,7 +332,7 @@ int dds60_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
osc_ref * 4294967296.0 + 0.5);
rig_debug(RIG_DEBUG_VERBOSE, "%s: word %lu, X6 multipler %d, phase %.2f\n",
__FUNCTION__, frg, priv->multiplier, priv->phase_step*PHASE_INCR);
__func__, frg, priv->multiplier, priv->phase_step*PHASE_INCR);
control = priv->multiplier ? 0x01 : 0x00;
control |= (priv->phase_step & 0x1f) << 3;

Wyświetl plik

@ -303,7 +303,7 @@ static int ad_sdio(hamlib_port_t *port, int i)
if (ret != RIG_OK)
rig_debug(RIG_DEBUG_ERR, "%s: unable to set statusbits\n",
__FUNCTION__);
__func__);
return ret;
}
@ -317,7 +317,7 @@ static int ad_sclk(hamlib_port_t *port, int i)
if (ret != RIG_OK)
rig_debug(RIG_DEBUG_ERR, "%s: unable to set statusbits\n",
__FUNCTION__);
__func__);
return ret;
}
@ -331,7 +331,7 @@ static int ad_ioupd(hamlib_port_t *port, int i)
if (ret != RIG_OK)
rig_debug(RIG_DEBUG_ERR, "%s: unable to set statusbits\n",
__FUNCTION__);
__func__);
return ret;
}
@ -408,7 +408,7 @@ int drt1_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
(priv->osc_freq * priv->ref_mult)
* 4294967296.0);
rig_debug(RIG_DEBUG_VERBOSE, "%s: [%#lx]\n", __FUNCTION__,frg);
rig_debug(RIG_DEBUG_VERBOSE, "%s: [%#lx]\n", __func__,frg);
ad_write_reg(port, FTW0, 4, frg);

Wyświetl plik

@ -256,7 +256,7 @@ static int ad_sdata(hamlib_port_t *port, int i)
if (ret != RIG_OK)
rig_debug(RIG_DEBUG_ERR, "%s: unable to set statusbits\n",
__FUNCTION__);
__func__);
return ret;
}
@ -270,7 +270,7 @@ static int ad_sclk(hamlib_port_t *port, int i)
if (ret != RIG_OK)
rig_debug(RIG_DEBUG_ERR, "%s: unable to set statusbits\n",
__FUNCTION__);
__func__);
return ret;
}
@ -284,7 +284,7 @@ static int ad_fsync(hamlib_port_t *port, int i)
if (ret != RIG_OK)
rig_debug(RIG_DEBUG_ERR, "%s: unable to set statusbits\n",
__FUNCTION__);
__func__);
return ret;
}
@ -339,7 +339,7 @@ int elektor304_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
fhh = (frg>>24)& 0xff;
rig_debug(RIG_DEBUG_VERBOSE, "%s: %lu=[%02x.%02x.%02x.%02x]\n",
__FUNCTION__,frg,fll,flh,fhl,fhh);
__func__,frg,fll,flh,fhl,fhh);
ad_write(port, 0xF800); /* Reset */

Wyświetl plik

@ -43,7 +43,7 @@ static int miniVNA_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
int retval;
sprintf_freq(fstr, freq);
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n", __func__,
rig_strvfo(vfo), fstr);
serial_flush(&rig->state.rigport);

Wyświetl plik

@ -69,7 +69,7 @@ pcrotor_move(ROT *rot, int direction, int speed)
{
unsigned char outputvalue;
rig_debug(RIG_DEBUG_TRACE, "%s called: %d %d\n", __FUNCTION__, direction, speed);
rig_debug(RIG_DEBUG_TRACE, "%s called: %d %d\n", __func__, direction, speed);
switch(direction) {
case ROT_MOVE_CCW:

Wyświetl plik

@ -100,7 +100,7 @@ static int rshfiq_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
int retval;
snprintf(fstr,sizeof(fstr), "%lu", (unsigned long int)(freq));
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_TRACE,"%s called: %s %s\n", __func__,
rig_strvfo(vfo), fstr);
serial_flush(&rig->state.rigport);

Wyświetl plik

@ -184,7 +184,7 @@ int lowe_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
*mode = RIG_MODE_AM;
else {
rig_debug(RIG_DEBUG_WARN,"%s: unknown mode '%s'\n",
__FUNCTION__, mdbuf);
__func__, mdbuf);
return -RIG_EPROTO;
}

Wyświetl plik

@ -334,7 +334,7 @@ const struct rot_caps rc2800_rot_caps = {
DECLARE_INITROT_BACKEND(m2)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&rc2800_rot_caps);

Wyświetl plik

@ -46,7 +46,7 @@ static int miniVNA_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
int retval;
sprintf_freq(fstr, freq);
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s %s\n", __FUNCTION__,
rig_debug(RIG_DEBUG_VERBOSE,"%s called: %s %s\n", __func__,
rig_strvfo(vfo), fstr);
serial_flush(&rig->state.rigport);
@ -63,7 +63,7 @@ static int miniVNA_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
static const char *miniVNA_get_info(RIG *rig)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
return "miniVNA";
}

Wyświetl plik

@ -323,7 +323,7 @@ int ra37xx_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
case RIG_MODE_RTTY: widthtype = 3; ra_mode = MD_FSK; break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode %s\n",
__FUNCTION__, rig_strrmode(mode));
__func__, rig_strrmode(mode));
return -RIG_EINVAL;
}
@ -423,7 +423,7 @@ int ra37xx_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported %s\n", __FUNCTION__, rig_strfunc(func));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported %s\n", __func__, rig_strfunc(func));
return -RIG_EINVAL;
}

Wyświetl plik

@ -104,7 +104,7 @@ static int sartek_rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elev
char cmdstr[8];
int len, err;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
if (!rot)
return -RIG_EINVAL;
@ -138,7 +138,7 @@ static int sartek_rot_stop(ROT *rot)
{
int err;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
err = write_block(&rot->state.rotport, "P\0", 2);
if (err != RIG_OK)
@ -155,7 +155,7 @@ static int sartek_rot_stop(ROT *rot)
DECLARE_INITROT_BACKEND(sartek)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&sartek_rot_caps);

Wyświetl plik

@ -48,7 +48,7 @@ static int spid_rot_init(ROT *rot)
{
struct spid_rot2prog_priv_data *priv;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
if (!rot || !rot->caps)
return -RIG_EINVAL;
@ -71,7 +71,7 @@ static int spid_rot_init(ROT *rot)
static int spid_rot_cleanup(ROT *rot)
{
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
if (!rot)
return -RIG_EINVAL;
@ -137,7 +137,7 @@ static int spid_rot1prog_rot_set_position(ROT *rot, azimuth_t az, elevation_t el
char cmdstr[13];
unsigned int u_az;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __FUNCTION__, az, el);
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
u_az = 360 + az;
@ -172,7 +172,7 @@ static int spid_rot2prog_rot_set_position(ROT *rot, azimuth_t az, elevation_t el
char cmdstr[13];
unsigned int u_az, u_el;
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __FUNCTION__, az, el);
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
if (!priv->az_resolution || !priv->el_resolution) {
do {
@ -232,7 +232,7 @@ static int spid_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
int retry_read = 0;
char posbuf[12];
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
do {
retval = write_block(&rs->rotport, "\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1F\x20", 13);
@ -271,7 +271,7 @@ static int spid_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
}
rig_debug(RIG_DEBUG_TRACE, "%s: (az, el) = (%.1f, %.1f)\n",
__FUNCTION__, *az, *el);
__func__, *az, *el);
return RIG_OK;
}
@ -283,7 +283,7 @@ static int spid_rot_stop(ROT *rot)
int retry_read = 0;
char posbuf[12];
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
do {
retval = write_block(&rs->rotport, "\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0F\x20", 13);
@ -311,7 +311,7 @@ static int spid_md01_rot2prog_rot_move(ROT *rot, int direction, int speed)
int retval;
char cmdstr[13];
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
switch (direction) {
case ROT_MOVE_UP:
@ -470,7 +470,7 @@ const struct rot_caps spid_md01_rot2prog_rot_caps = {
DECLARE_INITROT_BACKEND(spid)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
rot_register(&spid_rot1prog_rot_caps);
rot_register(&spid_rot2prog_rot_caps);

Wyświetl plik

@ -302,7 +302,7 @@ void network_flush(hamlib_port_t *rp)
if (ret != 0)
{
rig_debug(RIG_DEBUG_ERR, "%s: ioctl err '%s'\n", __FUNCTION__, strerror(errno));
rig_debug(RIG_DEBUG_ERR, "%s: ioctl err '%s'\n", __func__, strerror(errno));
break;
}

Wyświetl plik

@ -312,7 +312,7 @@ static char which_vfo(const RIG *rig, vfo_t vfo)
case RIG_VFO_NONE: return 'N';
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
}
@ -353,7 +353,7 @@ int tt538_reset(RIG *rig, reset_t reset) {
if (!strstr(reset_buf, "RADIO START")) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, reset_buf);
__func__, reset_buf);
return -RIG_EPROTO;
}
@ -380,12 +380,12 @@ int tt538_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
curVfo = which_vfo(rig, vfo);
if (respbuf[0] != curVfo) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
if (resp_len != 6) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected length '%d'\n",
__FUNCTION__, resp_len);
__func__, resp_len);
return -RIG_EPROTO;
}
@ -476,7 +476,7 @@ int tt538_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (respbuf[0] != 'M' || resp_len != 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -489,7 +489,7 @@ int tt538_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
break;
}
@ -502,7 +502,7 @@ int tt538_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
case TT538_FM: *mode = RIG_MODE_FM; break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode '%c'\n",
__FUNCTION__, ttmode);
__func__, ttmode);
return -RIG_EPROTO;
}
@ -516,7 +516,7 @@ int tt538_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (respbuf[0] != 'W' && resp_len != 3) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
/* Find bandwidth according to response from table. */
@ -531,7 +531,7 @@ int tt538_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
*width = pbwidth[rpb];
else {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected bandwidth '%c'\n",
__FUNCTION__, respbuf[1]);
__func__, respbuf[1]);
return -RIG_EPROTO;
}
return RIG_OK;
@ -571,7 +571,7 @@ int tt538_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
return retval;
if (respbuf[0] != 'M' || resp_len != 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -599,7 +599,7 @@ int tt538_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -656,7 +656,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'F' || lvl_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
fwd = (float) lvlbuf[1];
@ -668,7 +668,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'R' || lvl_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
refl = (float) lvlbuf[1];
@ -688,7 +688,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[0] != 'S' || lvl_len != 6) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
/* Jupiter returns actual S value in 1/256s of an S unit, in
@ -713,7 +713,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'G' || lvl_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -739,7 +739,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[0] != 'U' || lvl_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -756,7 +756,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[0] != 'I' || lvl_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
/* Note: Any RF gain over "50%" on front panel
@ -775,7 +775,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'P' || lvl_len != 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->i = (int) lvlbuf[1] * 256 + (int) lvlbuf[2];
@ -790,7 +790,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'J' || lvl_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->i = lvlbuf[1];
@ -805,7 +805,7 @@ int tt538_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'H' || lvl_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->f = ((float) lvlbuf[1] / 127);

Wyświetl plik

@ -274,19 +274,19 @@ static int tt588_transaction (RIG *rig, const char *cmd, int cmd_len, char *data
retval = read_string(&rs->rigport, data, (*data_len)+1, term, strlen(term));
if (retval != -RIG_ETIMEOUT)
return RIG_OK;
rig_debug(RIG_DEBUG_ERR,"%s: read_string failed, try#%d\n", __FUNCTION__, i+1);
rig_debug(RIG_DEBUG_ERR,"%s: read_string failed, try#%d\n", __func__, i+1);
}
else {
return RIG_OK; // no data wanted so just return
}
}
else {
rig_debug(RIG_DEBUG_ERR,"%s: write_block failed, try#%d\n", __FUNCTION__, i+1);
rig_debug(RIG_DEBUG_ERR,"%s: write_block failed, try#%d\n", __func__, i+1);
}
write_block(&rs->rigport, "XX" EOM, 3); // we wont' worry about the response here
retval = read_string(&rs->rigport, xxbuf, sizeof(xxbuf), "", 0); // this should timeout
if (retval != RIG_OK)
rig_debug(RIG_DEBUG_ERR,"%s: XX command failed, try#%d\n", __FUNCTION__, i+1);
rig_debug(RIG_DEBUG_ERR,"%s: XX command failed, try#%d\n", __func__, i+1);
}
return retval;
}
@ -299,7 +299,7 @@ int tt588_init(RIG *rig)
{
struct tt588_priv_data *priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s:\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s:\n", __func__);
priv = (struct tt588_priv_data *) malloc(sizeof(struct tt588_priv_data));
if (!priv) {
/* whoops! memory shortage! */
@ -348,10 +348,10 @@ int tt588_get_vfo(RIG *rig, vfo_t *vfo) {
struct tt588_priv_data *priv = (struct tt588_priv_data *) rig->state.priv;
*vfo = priv->vfo_curr;
if(check_vfo(*vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(*vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(*vfo));
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__, rig_strvfo(*vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(*vfo));
return RIG_OK;
}
@ -363,9 +363,9 @@ int tt588_set_vfo(RIG *rig, vfo_t vfo)
{
struct tt588_priv_data *priv = (struct tt588_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -383,14 +383,14 @@ int tt588_reset(RIG *rig, reset_t reset) {
int retval, reset_len;
char reset_buf[32];
rig_debug(RIG_DEBUG_VERBOSE, "%s: reset=%d\n", __FUNCTION__, reset);
rig_debug(RIG_DEBUG_VERBOSE, "%s: reset=%d\n", __func__, reset);
reset_len = 32;
retval = tt588_transaction (rig, "XX" EOM, 3, reset_buf, &reset_len);
if (retval != RIG_OK)
return retval;
if (!strstr(reset_buf, "RADIO START")) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __FUNCTION__, reset_buf);
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __func__, reset_buf);
return -RIG_EPROTO;
}
@ -411,7 +411,7 @@ int tt588_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
vfo = priv->vfo_curr;
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -422,7 +422,7 @@ int tt588_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
return retval;
if (resp_len != 6) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected length '%d'\n", __FUNCTION__, resp_len);
rig_debug(RIG_DEBUG_ERR, "%s: unexpected length '%d'\n", __func__, resp_len);
return -RIG_EPROTO;
}
if ((respbuf[0]=='A' || respbuf[0]=='B') && respbuf[5]==0x0d) {
@ -434,7 +434,7 @@ int tt588_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) {
else {
*freq = 0;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%g\n", __FUNCTION__, rig_strvfo(vfo),*freq);
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%g\n", __func__, rig_strvfo(vfo),*freq);
return RIG_OK;
}
@ -448,16 +448,16 @@ int tt588_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
int cmd_len, retval;
unsigned char cmdbuf[16];
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%g\n", __FUNCTION__, rig_strvfo(vfo), freq);
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s freq=%g\n", __func__, rig_strvfo(vfo), freq);
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
if (vfo == RIG_VFO_CURR) {
if ((retval = tt588_get_vfo(rig, &vfo)) != RIG_OK)
return retval;
rig_debug(RIG_DEBUG_VERBOSE, "%s: set_freq2 vfo=%s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: set_freq2 vfo=%s\n", __func__, rig_strvfo(vfo));
}
/* Freq is 4 bytes long, MSB sent first. */
bytes[3] = ((int) freq >> 24) & 0xff;
@ -521,12 +521,12 @@ int tt588_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
unsigned char cmdbuf[16], respbuf[32];
char ttmode;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
struct tt588_priv_data *priv = (struct tt588_priv_data *) rig->state.priv;
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
if (vfo == RIG_VFO_CURR) {
@ -544,7 +544,7 @@ int tt588_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
return retval;
if (respbuf[0] != 'M' || resp_len != 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __FUNCTION__, respbuf);
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __func__, respbuf);
return -RIG_EPROTO;
}
@ -556,7 +556,7 @@ int tt588_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
ttmode = respbuf[2];
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
break;
}
@ -569,7 +569,7 @@ int tt588_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
case TT588_CWR: *mode = RIG_MODE_CWR; break;
case TT588_FM: *mode = RIG_MODE_FM; break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode '%c'\n", __FUNCTION__, ttmode);
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode '%c'\n", __func__, ttmode);
return -RIG_EPROTO;
}
@ -582,7 +582,7 @@ int tt588_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
return retval;
if (respbuf[0] != 'W' && resp_len != 3) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __FUNCTION__, respbuf);
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __func__, respbuf);
return -RIG_EPROTO;
}
@ -657,9 +657,9 @@ int tt588_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
struct tt588_priv_data *priv = (struct tt588_priv_data *) rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s mode=%s width=%d\n", __FUNCTION__, rig_strvfo(vfo),rig_strrmode(mode),(int)width);
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s mode=%s width=%d\n", __func__, rig_strvfo(vfo),rig_strrmode(mode),(int)width);
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -670,7 +670,7 @@ int tt588_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (retval != RIG_OK)
return retval;
if (respbuf[0] != 'M' || respbuf[3] != 0x0d) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __FUNCTION__, respbuf);
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n", __func__, respbuf);
return -RIG_EPROTO;
}
@ -697,7 +697,7 @@ int tt588_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
cmd_len = sprintf((char *) cmdbuf, "*M%c%c" EOM, respbuf[1], ttmode);
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -725,7 +725,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
unsigned char cmdbuf[16],lvlbuf[32];
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -739,7 +739,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[0] != 'S' || lvl_len != 4 || lvlbuf[3] != 0x0d || ((lvlbuf[1]&0x80)==0)) {
val->f = 99; // infinity
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer len=%d buf=%02x %02x %02x %02x\n",
__FUNCTION__, lvl_len,lvlbuf[0],lvlbuf[1],lvlbuf[2],lvlbuf[3]);
__func__, lvl_len,lvlbuf[0],lvlbuf[1],lvlbuf[2],lvlbuf[3]);
return -RIG_EPROTO;
}
/* forward power. */
@ -762,7 +762,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'S' || lvl_len != 6) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __FUNCTION__, lvlbuf);
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __func__, lvlbuf);
return -RIG_EPROTO;
}
@ -775,7 +775,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
// 1st two bytes are the S-level
sscanf((char*)lvlbuf,"S%02d",&val->i);
val->i = (val->i - 9) * 6; // convert S meter to dBS9 relative
rig_debug(RIG_DEBUG_TRACE,"%s: meter= %ddB\n", __FUNCTION__, val->i);
rig_debug(RIG_DEBUG_TRACE,"%s: meter= %ddB\n", __func__, val->i);
}
else {
// transmit reply example S<0x8f><0x01> 0x0f=15 watts, 0x01
@ -784,7 +784,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
reflected = reflected>0 ? reflected-1 : 0;
// computer transmit power
int strength = (int)(lvlbuf[1]&0x7f)-reflected;
rig_debug(RIG_DEBUG_TRACE,"%s: strength fwd=%d, rev=%d\n", __FUNCTION__, strength, reflected);
rig_debug(RIG_DEBUG_TRACE,"%s: strength fwd=%d, rev=%d\n", __func__, strength, reflected);
if (strength > 0) { // convert watts to dbM
val->i = 10 * log10(strength) + 30;
// now convert to db over 1uV
@ -793,7 +793,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
else {
val->i = 0;
}
rig_debug(RIG_DEBUG_TRACE,"%s: strength= %ddB\n", __FUNCTION__, val->i);
rig_debug(RIG_DEBUG_TRACE,"%s: strength= %ddB\n", __func__, val->i);
}
break;
@ -808,7 +808,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'G' || lvl_len != 3 || lvlbuf[2] != 0x0d) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __FUNCTION__, lvlbuf);
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __func__, lvlbuf);
return -RIG_EPROTO;
}
@ -831,7 +831,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'U' || lvlbuf[2] != 0x0d) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __FUNCTION__, lvlbuf);
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __func__, lvlbuf);
return -RIG_EPROTO;
}
@ -840,7 +840,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_IF:
// Omni VII has so such thing
rig_debug(RIG_DEBUG_ERR,"%s: no RIG_LEVEL_IF on Omni VII\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s: no RIG_LEVEL_IF on Omni VII\n", __func__);
val->i = 0;
break;
@ -852,7 +852,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[0] != 'I' || lvlbuf[2] != 0x0d) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __FUNCTION__, lvlbuf);
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __func__, lvlbuf);
return -RIG_EPROTO;
}
@ -867,7 +867,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (retval != RIG_OK)
return retval;
if (lvlbuf[0] != 'J' || lvlbuf[2] != 0x0d) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __FUNCTION__, lvlbuf);
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __func__, lvlbuf);
return -RIG_EPROTO;
}
val->i = (lvlbuf[1]-'0')*6; // 1=6, 2=12, 3=18
@ -888,7 +888,7 @@ int tt588_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (retval != RIG_OK)
return retval;
if (lvlbuf[0] != 'H' || lvlbuf[2] != 0x0d) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __FUNCTION__, lvlbuf);
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n", __func__, lvlbuf);
return -RIG_EPROTO;
}
val->f = lvlbuf[1] / 127.0f;
@ -926,9 +926,9 @@ int tt588_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
int retval, cmd_len,ii;
unsigned char cmdbuf[16], agcmode;
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s level=%s\n", __FUNCTION__, rig_strvfo(vfo),rig_strlevel(level));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s level=%s\n", __func__, rig_strvfo(vfo),rig_strlevel(level));
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1013,9 +1013,9 @@ int tt588_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
tx_vfo = RIG_VFO_B;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s split=%d tx_vfo=%s\n", __FUNCTION__, rig_strvfo(vfo),split,rig_strvfo(tx_vfo));
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s split=%d tx_vfo=%s\n", __func__, rig_strvfo(vfo),split,rig_strvfo(tx_vfo));
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1032,7 +1032,7 @@ int tt588_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
if (retval != RIG_OK)
return retval;
if (respbuf[0] != 'N' || respbuf[2] != 0x0d) {
rig_debug(RIG_DEBUG_ERR,"%s: unknown response to *N%d='%s'\n", __FUNCTION__,split,respbuf);
rig_debug(RIG_DEBUG_ERR,"%s: unknown response to *N%d='%s'\n", __func__,split,respbuf);
return -RIG_EINVAL;
}
return RIG_OK;
@ -1048,7 +1048,7 @@ int tt588_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
char cmdbuf[16], respbuf[16];
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1057,7 +1057,7 @@ int tt588_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
resp_len = 3;
retval = tt588_transaction (rig, cmdbuf, cmd_len, respbuf, &resp_len);
if (resp_len != 3) {
rig_debug(RIG_DEBUG_ERR,"%s: bad response length, expected %d, got %d\n", __FUNCTION__,3,resp_len);
rig_debug(RIG_DEBUG_ERR,"%s: bad response length, expected %d, got %d\n", __func__,3,resp_len);
}
// respbuf returns "N0" or "N1" for split off/on
if (retval != RIG_OK)
@ -1072,7 +1072,7 @@ int tt588_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
else
*tx_vfo = RIG_VFO_A; // VFO A when not in split
rig_debug(RIG_DEBUG_VERBOSE,"%s: split=%d tx_vfo=%s\n", __FUNCTION__,*split,rig_strvfo(*tx_vfo));
rig_debug(RIG_DEBUG_VERBOSE,"%s: split=%d tx_vfo=%s\n", __func__,*split,rig_strvfo(*tx_vfo));
return RIG_OK;
}
@ -1086,9 +1086,9 @@ int tt588_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
int retval, cmd_len;
char cmdbuf[32];
rig_debug(RIG_DEBUG_VERBOSE,"%s: ptt=%d\n", __FUNCTION__,ptt);
rig_debug(RIG_DEBUG_VERBOSE,"%s: ptt=%d\n", __func__,ptt);
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1120,17 +1120,17 @@ const char *tt588_get_info(RIG *rig)
cmd_len = sprintf(cmdbuf,"?V" EOM);
memset(firmware,0,sizeof(firmware));
firmware_len = sizeof(firmware);
rig_debug(RIG_DEBUG_VERBOSE,"%s: firmware_len=%d\n", __FUNCTION__,firmware_len);
rig_debug(RIG_DEBUG_VERBOSE,"%s: firmware_len=%d\n", __func__,firmware_len);
retval = tt588_transaction (rig, cmdbuf, cmd_len, firmware, &firmware_len);
// Response should be "VER 1010-588 " plus "RADIO x\r" or "REMOTEx\r"
// if x=blank ham band transmit only
// if x='M' MARS transmit only
if (retval != RIG_OK) {
rig_debug(RIG_DEBUG_ERR,"%s: ack NG, len=%d\n", __FUNCTION__, firmware_len);
rig_debug(RIG_DEBUG_ERR,"%s: ack NG, len=%d\n", __func__, firmware_len);
return NULL;
}
rig_debug(RIG_DEBUG_VERBOSE,"%s: %s\n", __FUNCTION__,firmware);
rig_debug(RIG_DEBUG_VERBOSE,"%s: %s\n", __func__,firmware);
return firmware;
}
@ -1146,7 +1146,7 @@ int tt588_get_xit(RIG * rig, vfo_t vfo, shortfreq_t *xit)
char cmdbuf[16], respbuf[16];
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1155,7 +1155,7 @@ int tt588_get_xit(RIG * rig, vfo_t vfo, shortfreq_t *xit)
resp_len = 5;
retval = tt588_transaction (rig, cmdbuf, cmd_len, respbuf, &resp_len);
if (resp_len != 5) {
rig_debug(RIG_DEBUG_ERR,"%s: bad response length, expected %d, got %d\n", __FUNCTION__,5,resp_len);
rig_debug(RIG_DEBUG_ERR,"%s: bad response length, expected %d, got %d\n", __func__,5,resp_len);
}
if (retval != RIG_OK)
return retval;
@ -1178,9 +1178,9 @@ static int set_rit_xit(RIG * rig, vfo_t vfo, shortfreq_t rit, int which)
int retval, cmd_len;
char cmdbuf[16];
rig_debug(RIG_DEBUG_VERBOSE, "%s: rit=%d\n", __FUNCTION__, (int)rit);
rig_debug(RIG_DEBUG_VERBOSE, "%s: rit=%d\n", __func__, (int)rit);
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1227,7 +1227,7 @@ int tt588_get_ant(RIG * rig, vfo_t vfo, ant_t *ant)
char cmdbuf[16], respbuf[16];
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -1237,7 +1237,7 @@ int tt588_get_ant(RIG * rig, vfo_t vfo, ant_t *ant)
// this should be the only line needing change for remote operation
retval = tt588_transaction (rig, cmdbuf, cmd_len, respbuf, &resp_len);
if (resp_len != 5) {
rig_debug(RIG_DEBUG_ERR,"%s: bad response length, expected %d, got %d\n", __FUNCTION__,5,resp_len);
rig_debug(RIG_DEBUG_ERR,"%s: bad response length, expected %d, got %d\n", __func__,5,resp_len);
}
if (retval != RIG_OK)
return retval;
@ -1245,7 +1245,7 @@ int tt588_get_ant(RIG * rig, vfo_t vfo, ant_t *ant)
if (respbuf[0] != 'C' || respbuf[4] != 0x0d)
return -RIG_EPROTO;
*ant = respbuf[3];
rig_debug(RIG_DEBUG_VERBOSE,"%s: rit=%d\n", __FUNCTION__,*ant);
rig_debug(RIG_DEBUG_VERBOSE,"%s: rit=%d\n", __func__,*ant);
return RIG_OK;
}
@ -1261,10 +1261,10 @@ int tt588_set_ant(RIG * rig, vfo_t vfo, ant_t ant)
char cmdbuf[16];
if(check_vfo(vfo)==FALSE) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __FUNCTION__, rig_strvfo(vfo));
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n", __func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: ant=%d\n", __FUNCTION__, ant);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ant=%d\n", __func__, ant);
cmd_len = sprintf(cmdbuf,"*C1Vx" EOM);
// 0 = RX=TX=ANT1

Wyświetl plik

@ -281,7 +281,7 @@ static char which_receiver(const RIG *rig, vfo_t vfo)
case RIG_VFO_SUB: return 'S';
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported Receiver %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
}
@ -304,7 +304,7 @@ static char which_vfo(const RIG *rig, vfo_t vfo)
case RIG_VFO_NONE: return 'N';
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
}
@ -408,7 +408,7 @@ int tt565_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
/* Test for valid binary mode return. */
if (respbuf[1] != which_vfo(rig,vfo) || resp_len <= 5) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
/* Convert binary to integer, endedness independent */
@ -526,7 +526,7 @@ int tt565_get_split_vfo(RIG *rig, vfo_t vfo, split_t *split, vfo_t *tx_vfo)
if (respbuf[2] != 'V' || resp_len < 5) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -620,7 +620,7 @@ int tt565_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (respbuf[1] != 'R' || respbuf[3] != 'M' || resp_len <= 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -636,7 +636,7 @@ int tt565_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
case TT565_RTTY: *mode = RIG_MODE_RTTY; break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode '%c'\n",
__FUNCTION__, ttmode);
__func__, ttmode);
return -RIG_EPROTO;
}
/* Orion may need some time to "recover" from ?RxM before ?RxF */
@ -651,7 +651,7 @@ int tt565_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
if (respbuf[1] != 'R' || respbuf[3] != 'F' || resp_len <= 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -704,7 +704,7 @@ int tt565_get_ts(RIG *rig, vfo_t vfo, shortfreq_t *ts)
if (respbuf[1] != 'R' || respbuf[3] != 'I' || resp_len <= 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -758,7 +758,7 @@ int tt565_get_rit(RIG *rig, vfo_t vfo, shortfreq_t *rit)
if (respbuf[1] != 'R' || respbuf[3] != 'R' || resp_len <= 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -814,7 +814,7 @@ int tt565_get_xit(RIG *rig, vfo_t vfo, shortfreq_t *xit)
if (respbuf[1] != 'R' || respbuf[3] != 'X' || resp_len <= 4) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -858,7 +858,7 @@ int tt565_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
if (respbuf[1] != 'S' || resp_len < 5) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -889,7 +889,7 @@ int tt565_reset(RIG *rig, reset_t reset)
if (retval != RIG_OK) return retval;
if (!strstr(reset_buf, "ORION START")) {
rig_debug(RIG_DEBUG_ERR, "%s: unexpected answer '%s'\n",
__FUNCTION__, reset_buf);
__func__, reset_buf);
return -RIG_EPROTO;
}
return RIG_OK;
@ -911,7 +911,7 @@ const char *tt565_get_info(RIG *rig)
retval = tt565_transaction (rig, "?V" EOM, 3, buf, &firmware_len);
if (retval != RIG_OK || firmware_len < 8) {
rig_debug(RIG_DEBUG_ERR,"%s: ack NG, len=%d\n",
__FUNCTION__, firmware_len);
__func__, firmware_len);
buf[0] = '\0';
return buf;
}
@ -1155,7 +1155,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'S' || lvl_len < 5 ) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
if (lvlbuf[2]=='T') {
@ -1174,7 +1174,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'S' || lvl_len < 5) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1203,7 +1203,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'T' || lvlbuf[2] != 'P' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1221,7 +1221,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'R' || lvlbuf[3] != 'A' || lvl_len < 5) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1247,7 +1247,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'U' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1265,7 +1265,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'R' || lvlbuf[3] != 'P' || lvl_len < 5) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1283,7 +1283,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'R' || lvlbuf[3] != 'G' || lvl_len < 5) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1301,7 +1301,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'R' || lvlbuf[3] != 'T' || lvl_len < 5) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1324,7 +1324,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'R' || lvlbuf[3] != 'E' || lvl_len < 5) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1342,7 +1342,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'R' || lvlbuf[3] != 'S' || lvl_len < 5) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1357,7 +1357,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'T' || lvlbuf[2] != 'M' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1372,7 +1372,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'T' || lvlbuf[2] != 'S' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
@ -1387,7 +1387,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'C' || lvlbuf[2] != 'T' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->i = atoi(lvlbuf+3);
@ -1401,7 +1401,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'C' || lvlbuf[2] != 'S' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->i = atoi(lvlbuf+3);
@ -1419,7 +1419,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (lvlbuf[1] != 'R' || lvlbuf[3] != 'N' || lvlbuf[4] != 'B' ||
lvl_len < 6 ) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->f = atof(lvlbuf+5)/9.0; /* Note 0-9 -> 0.0 - 1.0 */
@ -1432,7 +1432,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[1] != 'T' || lvlbuf[2] != 'H' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->f = 10.0*atof(lvlbuf+3);
@ -1445,7 +1445,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[1] != 'T' || lvlbuf[2] != 'G' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->f = 0.01 * atof(lvlbuf+3);
@ -1458,7 +1458,7 @@ int tt565_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
return retval;
if (lvlbuf[1] != 'T' || lvlbuf[2] != 'A' || lvl_len < 4) {
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer '%s'\n",
__FUNCTION__, lvlbuf);
__func__, lvlbuf);
return -RIG_EPROTO;
}
val->f = 0.01 * atof(lvlbuf+3);
@ -1549,7 +1549,7 @@ int tt565_vfo_op(RIG * rig, vfo_t vfo, vfo_op_t op)
default:
rig_debug(RIG_DEBUG_ERR,"%s: Unsupported op %d\n",
__FUNCTION__, op);
__func__, op);
return -RIG_EINVAL;
}
@ -1755,7 +1755,7 @@ int tt565_set_ant(RIG * rig, vfo_t vfo, ant_t ant)
return retval;
if (resp_len != 7 || respbuf[1] != 'K' || respbuf[2] != 'A') {
rig_debug(RIG_DEBUG_ERR,"%s; tt565_set_ant: ?KA NG %s\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
@ -1828,7 +1828,7 @@ int tt565_get_ant(RIG *rig, vfo_t vfo, ant_t *ant)
return retval;
if (respbuf[1] != 'K' || respbuf[2] != 'A' || resp_len != 7) {
rig_debug(RIG_DEBUG_ERR,"%s; tt565_get_ant: NG %s\n",
__FUNCTION__, respbuf);
__func__, respbuf);
return -RIG_EPROTO;
}
/* Look for first occurrence of M or S in ant 1, 2, 3 characters */

Wyświetl plik

@ -107,7 +107,7 @@ int tentec2_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
case RIG_VFO_B: freqbuf[1] = 'B'; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
freqbuf[2] = (f >> 24) & 0xFF;
@ -147,7 +147,7 @@ int tentec2_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
case RIG_VFO_B: freqbuf[1] = 'B'; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -199,7 +199,7 @@ int tentec2_set_vfo(RIG *rig, vfo_t vfo)
case RIG_VFO_B: vfobuf[3] = 'B'; break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %s\n",
__FUNCTION__, rig_strvfo(vfo));
__func__, rig_strvfo(vfo));
return -RIG_EINVAL;
}
@ -433,7 +433,7 @@ int tentec2_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
case TT_FM: *mode = RIG_MODE_FM; break;
default:
rig_debug(RIG_DEBUG_ERR, "%s: unsupported mode '%c'\n",
__FUNCTION__, mdbuf[vfo == RIG_VFO_A ? 1 : 2]);
__func__, mdbuf[vfo == RIG_VFO_A ? 1 : 2]);
return -RIG_EPROTO;
}
@ -560,7 +560,7 @@ const char *tentec2_get_info(RIG *rig)
/* "VER 1010-516" */
if (retval != RIG_OK || firmware_len != 12) {
rig_debug(RIG_DEBUG_ERR,"%s: ack NG, len=%d\n",
__FUNCTION__, firmware_len);
__func__, firmware_len);
return NULL;
}
if (firmware_len < 100)

Wyświetl plik

@ -153,7 +153,7 @@ transaction_write:
/* Check that command termination is correct */
if (strchr(EOM, data[strlen(data)-1])==NULL) {
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n", __FUNCTION__, data);
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n", __func__, data);
if (retry_read++ < rig->state.rigport.retry)
goto transaction_write;
retval = -RIG_EPROTO;
@ -172,14 +172,14 @@ transaction_write:
*/
if (strcmp(data, "NG"EOM) || strcmp(data, "ORER"EOM)) {
/* Invalid command */
rig_debug(RIG_DEBUG_VERBOSE, "%s: NG/Overflow for '%s'\n", __FUNCTION__, cmdstr);
rig_debug(RIG_DEBUG_VERBOSE, "%s: NG/Overflow for '%s'\n", __func__, cmdstr);
retval = -RIG_EPROTO;
goto transaction_quit;
}
if (strcmp(data, "ERR"EOM)) {
/* Command format error */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Error for '%s'\n", __FUNCTION__, cmdstr);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Error for '%s'\n", __func__, cmdstr);
retval = -RIG_EINVAL;
goto transaction_quit;
}
@ -212,7 +212,7 @@ transaction_write:
* to the decoder for callback. That way we don't ignore
* any commands.
*/
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected reply '%s'\n", __FUNCTION__, data);
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected reply '%s'\n", __func__, data);
if (retry_read++ < rig->state.rigport.retry)
goto transaction_write;

Wyświetl plik

@ -140,7 +140,7 @@ transaction_write:
* consistant carriage return or newline.
* ie: STS command will not return either "\r" or "\n"! */
/*if (strchr(EOM, data[strlen(data)-1])==NULL) {
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n", __FUNCTION__, data);
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n", __func__, data);
if (retry_read++ < rig->state.rigport.retry)
goto transaction_write;
retval = -RIG_EPROTO;
@ -159,28 +159,28 @@ transaction_write:
*/
if (strcmp(data, "NG"EOM)) {
/* Invalid command */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Command Format Error / Value Error for '%s'\n", __FUNCTION__, cmdstr);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Command Format Error / Value Error for '%s'\n", __func__, cmdstr);
retval = -RIG_EPROTO;
goto transaction_quit;
}
if (strcmp(data, "ERR"EOM)) {
/* Command format error */
rig_debug(RIG_DEBUG_VERBOSE, "%s: The Command is Invalid at this Time for '%s'\n", __FUNCTION__, cmdstr);
rig_debug(RIG_DEBUG_VERBOSE, "%s: The Command is Invalid at this Time for '%s'\n", __func__, cmdstr);
retval = -RIG_EINVAL;
goto transaction_quit;
}
if (strcmp(data, "FER"EOM)) {
/* Framing error */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Framing Error for '%s'\n", __FUNCTION__, cmdstr);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Framing Error for '%s'\n", __func__, cmdstr);
retval = -RIG_EINVAL;
goto transaction_quit;
}
if (strcmp(data, "ORER"EOM)) {
/* Overrun error */
rig_debug(RIG_DEBUG_VERBOSE, "%s: Overrun Error for '%s'\n", __FUNCTION__, cmdstr);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Overrun Error for '%s'\n", __func__, cmdstr);
retval = -RIG_EINVAL;
goto transaction_quit;
}
@ -213,7 +213,7 @@ transaction_write:
* to the decoder for callback. That way we don't ignore
* any commands.
*/
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected reply '%s'\n", __FUNCTION__, data);
rig_debug(RIG_DEBUG_ERR, "%s: Unexpected reply '%s'\n", __func__, data);
if (retry_read++ < rig->state.rigport.retry)
goto transaction_write;

Wyświetl plik

@ -190,7 +190,7 @@ int g3_init(RIG *rig)
if (!priv->dll) {
rig_debug(RIG_DEBUG_ERR, "%s: Unable to LoadLibrary %s\n",
__FUNCTION__, WRG3DLL);
__func__, WRG3DLL);
free(priv);
return -RIG_EIO; /* huh! */
}

Wyświetl plik

@ -191,7 +191,7 @@ int g3_init(RIG *rig)
if (!priv->dll) {
rig_debug(RIG_DEBUG_ERR, "%s: Unable to LoadLibrary %s\n",
__FUNCTION__, WRG3DLL);
__func__, WRG3DLL);
free(priv);
return -RIG_EIO; /* huh! */
}

Wyświetl plik

@ -88,12 +88,12 @@ void *g313_init_api(void)
void *hWRAPI=dlopen("wrg313api.so", RTLD_LAZY);
if(hWRAPI==0)
{
rig_debug(RIG_DEBUG_ERR, "%s: Unable to load G313 shared library wrg313api.so\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: Unable to load G313 shared library wrg313api.so\n", __func__);
return 0;
}
if(InitAPI(hWRAPI)==0)
{
rig_debug(RIG_DEBUG_ERR, "%s: Unable to initialise G313 api\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR, "%s: Unable to initialise G313 api\n", __func__);
return 0;
}
return hWRAPI;
@ -114,7 +114,7 @@ int g313_init(RIG *rig)
priv->hWRAPI = g313_init_api();
if(priv->hWRAPI)
rig_debug(RIG_DEBUG_VERBOSE, "%s: Initialised G313 API\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Initialised G313 API\n", __func__);
/* otherwise try again when open rig */
rig->state.priv = (void*)priv;
@ -137,7 +137,7 @@ int g313_open(RIG *rig)
{
priv->hWRAPI = g313_init_api();
if(priv->hWRAPI) {
rig_debug(RIG_DEBUG_VERBOSE, "%s: Initialised G313 API\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Initialised G313 API\n", __func__);
}
else {
return -RIG_EIO; /* can't go any further */
@ -153,7 +153,7 @@ int g313_open(RIG *rig)
/* Open Winradio receiver handle (default to first device?) */
rig_debug(RIG_DEBUG_VERBOSE, "%s: found %d rigs 0 is %s\n", __FUNCTION__, Count, List[0].Path);
rig_debug(RIG_DEBUG_VERBOSE, "%s: found %d rigs 0 is %s\n", __func__, Count, List[0].Path);
if(rig->state.rigport.pathname[0])
priv->hRadio = OpenDevice(rig->state.rigport.pathname);
@ -167,23 +167,23 @@ int g313_open(RIG *rig)
{
return -RIG_EIO; /* huh! */
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: Openned G313\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Openned G313\n", __func__);
/* Make sure the receiver is switched on */
SetPower(priv->hRadio, 1);
priv->audio_buf.fd = open(priv->audio_buf.path, O_WRONLY|O_NONBLOCK);
rig_debug(RIG_DEBUG_VERBOSE, "%s: audio path %s fifo: %d\n", __FUNCTION__, priv->audio_buf.path, priv->audio_buf.fd);
rig_debug(RIG_DEBUG_VERBOSE, "%s: audio path %s fifo: %d\n", __func__, priv->audio_buf.path, priv->audio_buf.fd);
if(priv->audio_buf.fd == -1)
audio_callback = NULL;
priv->if_buf.fd = open(priv->if_buf.path, O_WRONLY|O_NONBLOCK);
rig_debug(RIG_DEBUG_VERBOSE, "%s: if path %s fifo: %d\n", __FUNCTION__, priv->if_buf.path, priv->if_buf.fd);
rig_debug(RIG_DEBUG_VERBOSE, "%s: if path %s fifo: %d\n", __func__, priv->if_buf.path, priv->if_buf.fd);
if(priv->if_buf.fd == -1)
if_callback = NULL;
priv->spectrum_buf.fd = open(priv->spectrum_buf.path, O_WRONLY|O_NONBLOCK);
rig_debug(RIG_DEBUG_VERBOSE, "%s: spectrum path %s fifo: %d\n", __FUNCTION__, priv->spectrum_buf.path, priv->spectrum_buf.fd);
rig_debug(RIG_DEBUG_VERBOSE, "%s: spectrum path %s fifo: %d\n", __func__, priv->spectrum_buf.path, priv->spectrum_buf.fd);
if(priv->spectrum_buf.fd == -1)
spectrum_callback = NULL;
@ -193,7 +193,7 @@ int g313_open(RIG *rig)
return -RIG_EIO;
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: told G313 to start streaming audio: %d, if: %d, spec: %d\n",
__FUNCTION__,
__func__,
audio_callback?1:0, if_callback?1:0, spectrum_callback?1:0);
priv->Opened=1;
@ -213,14 +213,14 @@ int g313_close(RIG *rig)
priv->Opened=0;
/*
rig_debug(RIG_DEBUG_VERBOSE, "%s: stop streaming\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: stop streaming\n", __func__);
StopStreaming(priv->hRadio);
req.tv_sec=0;
req.tv_nsec=500000000L;
nanosleep(&req, NULL);
*/
rig_debug(RIG_DEBUG_VERBOSE, "%s: Closing G313\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Closing G313\n", __func__);
CloseDevice(priv->hRadio);
return RIG_OK;
@ -235,7 +235,7 @@ int g313_cleanup(RIG *rig)
priv=(struct g313_priv_data *)rig->state.priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s: close fifos\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: close fifos\n", __func__);
if(priv->audio_buf.fd>=0)
close(priv->audio_buf.fd);
if(priv->if_buf.fd>=0)
@ -243,7 +243,7 @@ int g313_cleanup(RIG *rig)
if(priv->spectrum_buf.fd)
close(priv->spectrum_buf.fd);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Uninitialising G313 API\n", __FUNCTION__);
rig_debug(RIG_DEBUG_VERBOSE, "%s: Uninitialising G313 API\n", __func__);
if(priv->hWRAPI)
{
dlclose(priv->hWRAPI);
@ -259,7 +259,7 @@ int g313_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
struct g313_priv_data *priv = (struct g313_priv_data *)rig->state.priv;
int ret;
rig_debug(RIG_DEBUG_VERBOSE, "%s: %u\n", __FUNCTION__, (unsigned int)freq);
rig_debug(RIG_DEBUG_VERBOSE, "%s: %u\n", __func__, (unsigned int)freq);
ret = SetFrequency(priv->hRadio, (unsigned int) (freq));
ret = ret==0 ? RIG_OK : -RIG_EIO;
@ -272,7 +272,7 @@ int g313_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
unsigned int f;
int ret = GetFrequency(priv->hRadio, &f);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d f: %u\n", __FUNCTION__, ret, f);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d f: %u\n", __func__, ret, f);
if(ret)
return -RIG_EIO;
@ -286,7 +286,7 @@ int g313_set_powerstat(RIG *rig, powerstat_t status)
int p = status==RIG_POWER_ON ? 1 : 0;
int ret = SetPower(priv->hRadio, p);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d state: %d\n", __FUNCTION__, ret, p);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d state: %d\n", __func__, ret, p);
return ret==0 ? RIG_OK : -RIG_EIO;
}
@ -297,7 +297,7 @@ int g313_get_powerstat(RIG *rig, powerstat_t *status)
int p;
int ret = GetPower(priv->hRadio, &p);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d state: %d\n", __FUNCTION__, ret, p);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d state: %d\n", __func__, ret, p);
if(ret)
return -RIG_EIO;
@ -314,7 +314,7 @@ int g313_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
switch(level) {
case RIG_LEVEL_ATT:
ret = SetAttenuator(priv->hRadio, val.i != 0 ? 1 : 0);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Attenuator: %d\n", __FUNCTION__, ret, val.i);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Attenuator: %d\n", __func__, ret, val.i);
break;
case RIG_LEVEL_AGC:
@ -335,12 +335,12 @@ int g313_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
return -RIG_EINVAL;
}
ret = SetAGC(priv->hRadio, agc);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d AGC: %d\n", __FUNCTION__, ret, val.i);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d AGC: %d\n", __func__, ret, val.i);
break;
case RIG_LEVEL_RF:
ret = SetIFGain(priv->hRadio, (int)(val.f*100));
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Gain: %f\n", __FUNCTION__, ret, val.f);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Gain: %f\n", __func__, ret, val.f);
break;
default:
@ -362,7 +362,7 @@ int g313_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
switch(level) {
case RIG_LEVEL_ATT:
ret = GetAttenuator(priv->hRadio, &value);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Attenuator: %u\n", __FUNCTION__, ret, value);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Attenuator: %u\n", __func__, ret, value);
if(ret)
return -RIG_EIO;
val->i = value?rig->caps->attenuator[0]:0;
@ -370,7 +370,7 @@ int g313_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_AGC:
ret = GetAGC(priv->hRadio, &value);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d AGC: %u\n", __FUNCTION__, ret, value);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d AGC: %u\n", __func__, ret, value);
if(ret)
return -RIG_EIO;
@ -394,7 +394,7 @@ int g313_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_RF:
ret = GetIFGain(priv->hRadio, &uvalue);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Gain: %u\n", __FUNCTION__, ret, uvalue);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Gain: %u\n", __func__, ret, uvalue);
if(ret)
return -RIG_EIO;
val->f = ((float)uvalue)/100.0;
@ -402,7 +402,7 @@ int g313_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_STRENGTH:
ret = GetSignalStrength(priv->hRadio, &dbl);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d sigstr: %f\n", __FUNCTION__, ret, dbl);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d sigstr: %f\n", __func__, ret, dbl);
if(ret)
return -RIG_EIO;
val->i = ((int)dbl/1.0)+73;
@ -410,7 +410,7 @@ int g313_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
case RIG_LEVEL_RAWSTR:
ret = GetRawSignalStrength(priv->hRadio, &ch);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Raw Sigstr: %u\n", __FUNCTION__, ret, (unsigned int)ch);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d Raw Sigstr: %u\n", __func__, ret, (unsigned int)ch);
if(ret)
return -RIG_EIO;
val->i = ch;
@ -436,7 +436,7 @@ static const char* g313_get_info(RIG *rig)
if(ret)
return NULL;
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d sernum: %s\n", __FUNCTION__, ret, info.SerNum);
rig_debug(RIG_DEBUG_VERBOSE, "%s: ret: %d sernum: %s\n", __func__, ret, info.SerNum);
return info.SerNum;
}
@ -451,32 +451,32 @@ int g313_set_conf(RIG *rig, token_t token, const char *val)
case TOK_SHM_AUDIO:
if(len>(FIFO_PATHNAME_SIZE-1))
{
rig_debug(RIG_DEBUG_WARN, "%s: set audio_path %s is too long\n", __FUNCTION__, val);
rig_debug(RIG_DEBUG_WARN, "%s: set audio_path %s is too long\n", __func__, val);
return -RIG_EINVAL;
}
memset(priv->audio_buf.path, 0, FIFO_PATHNAME_SIZE);
strcpy(priv->audio_buf.path, val);
rig_debug(RIG_DEBUG_VERBOSE, "%s: set audio_path %s\n", __FUNCTION__, priv->audio_buf.path);
rig_debug(RIG_DEBUG_VERBOSE, "%s: set audio_path %s\n", __func__, priv->audio_buf.path);
break;
case TOK_SHM_IF:
if(len>(FIFO_PATHNAME_SIZE-1))
{
rig_debug(RIG_DEBUG_WARN, "%s: set if_path %s is too long\n", __FUNCTION__, val);
rig_debug(RIG_DEBUG_WARN, "%s: set if_path %s is too long\n", __func__, val);
return -RIG_EINVAL;
}
memset(priv->if_buf.path, 0, FIFO_PATHNAME_SIZE);
strcpy(priv->if_buf.path, val);
rig_debug(RIG_DEBUG_VERBOSE, "%s: set if_path %s\n", __FUNCTION__, priv->if_buf.path);
rig_debug(RIG_DEBUG_VERBOSE, "%s: set if_path %s\n", __func__, priv->if_buf.path);
break;
case TOK_SHM_SPECTRUM:
if(len>(FIFO_PATHNAME_SIZE-1))
{
rig_debug(RIG_DEBUG_WARN, "%s: set spectrum_path %s is too long\n", __FUNCTION__, val);
rig_debug(RIG_DEBUG_WARN, "%s: set spectrum_path %s is too long\n", __func__, val);
return -RIG_EINVAL;
}
memset(priv->spectrum_buf.path, 0, FIFO_PATHNAME_SIZE);
strcpy(priv->spectrum_buf.path, val);
rig_debug(RIG_DEBUG_VERBOSE, "%s: set spectrum_path %s\n", __FUNCTION__, priv->spectrum_buf.path);
rig_debug(RIG_DEBUG_VERBOSE, "%s: set spectrum_path %s\n", __func__, priv->spectrum_buf.path);
}
return RIG_OK;
}

Wyświetl plik

@ -249,7 +249,7 @@ int g313_init(RIG *rig)
if(priv->hWRG313WO==NULL)
{
rig_debug(RIG_DEBUG_ERR, "%s: Unable to LoadLibrary WRG313WO.dll\n",
__FUNCTION__);
__func__);
FreeLibrary(priv->WinMM);
free(priv);
return -RIG_EIO;
@ -261,7 +261,7 @@ int g313_init(RIG *rig)
if(!priv->StartWaveOut || !priv->StopWaveOut)
{
rig_debug(RIG_DEBUG_ERR, "%s: Unable to load valid WRG313WO.dll library\n",
__FUNCTION__);
__func__);
FreeLibrary(priv->hWRG313WO);
FreeLibrary(priv->WinMM);
free(priv);
@ -274,7 +274,7 @@ int g313_init(RIG *rig)
if (!priv->dll) {
rig_debug(RIG_DEBUG_ERR, "%s: Unable to LoadLibrary %s\n",
__FUNCTION__, WRG313DLL);
__func__, WRG313DLL);
FreeLibrary(priv->hWRG313WO);
FreeLibrary(priv->WinMM);
free(priv);
@ -311,7 +311,7 @@ int g313_init(RIG *rig)
!priv->GetSignalStrengthdBm || !priv->GetRawSignalStrength)
{
rig_debug(RIG_DEBUG_ERR, "%s: Unable to load valid %s library\n",
__FUNCTION__, WRG313DLL);
__func__, WRG313DLL);
FreeLibrary(priv->dll);
FreeLibrary(priv->hWRG313WO);
FreeLibrary(priv->WinMM);

Wyświetl plik

@ -385,7 +385,7 @@ int frg100_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (retval < 1) {
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
__FUNCTION__,retval);
__func__,retval);
return retval < 0 ? retval : -RIG_EIO;
}

Wyświetl plik

@ -218,7 +218,7 @@ int ft736_open(RIG *rig)
struct ft736_priv_data *priv;
int ret;
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__func__);
priv = (struct ft736_priv_data *) calloc(1, sizeof(struct ft736_priv_data));
if (!priv)
@ -240,7 +240,7 @@ int ft736_close(RIG *rig)
{
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x80, 0x80, 0x80, 0x80, 0x80};
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__func__);
free(rig->state.priv);
@ -411,7 +411,7 @@ int ft736_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
if (retval < 1) {
rig_debug(RIG_DEBUG_ERR,"%s: read squelch failed %d\n",
__FUNCTION__,retval);
__func__,retval);
return retval < 0 ? retval : -RIG_EIO;
}
@ -440,7 +440,7 @@ int ft736_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (retval < 1) {
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
__FUNCTION__,retval);
__func__,retval);
return retval < 0 ? retval : -RIG_EIO;
}

Wyświetl plik

@ -381,7 +381,7 @@ int ft767_init(RIG *rig) {
if (!p) /* whoops! memory shortage! */
return -RIG_ENOMEM;
rig_debug(RIG_DEBUG_TRACE,"%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE,"%s called\n", __func__);
/* TODO: read pacing from preferences */
@ -408,7 +408,7 @@ int ft767_cleanup(RIG *rig) {
if (!rig)
return -RIG_EINVAL;
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__);
if (rig->state.priv)
free(rig->state.priv);
@ -432,14 +432,14 @@ int ft767_open(RIG *rig)
/* send 0 delay PACING cmd to rig */
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
memset(priv->update_data,0,FT767GX_STATUS_UPDATE_DATA_LENGTH);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
memset(priv->update_data,0,FT767GX_STATUS_UPDATE_DATA_LENGTH);
return retval;
}
@ -474,20 +474,20 @@ int ft767_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
}
return retval;
}
@ -502,20 +502,20 @@ int ft767_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
}
return retval;
}
@ -609,20 +609,20 @@ int ft767_set_vfo(RIG *rig, vfo_t vfo) {
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
}
return retval;
}
@ -679,20 +679,20 @@ int ft767_set_ctcss_tone(RIG * rig, vfo_t vfo, tone_t tone) {
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
}
return retval;
}
@ -704,7 +704,7 @@ int ft767_get_ctcss_tone(RIG * rig, vfo_t vfo, tone_t *tone) {
retval = ft767_get_update_data(rig); /* get whole shebang from rig */
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: get_update_data failed with status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
retval = rig2ctcss(rig, priv->update_data[STATUS_CURR_TONE], tone);
@ -751,10 +751,10 @@ int ft767_set_split_freq(RIG * rig, vfo_t vfo, freq_t tx_freq) {
change_vfo = RIG_VFO_A;
break;
case RIG_VFO_MEM:
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __func__);
return RIG_OK;
default:
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __FUNCTION__, curr_vfo);
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __func__, curr_vfo);
return RIG_OK;
}
} else {
@ -767,7 +767,7 @@ int ft767_set_split_freq(RIG * rig, vfo_t vfo, freq_t tx_freq) {
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
@ -776,7 +776,7 @@ int ft767_set_split_freq(RIG * rig, vfo_t vfo, freq_t tx_freq) {
retval = ft767_send_block_and_ack(rig, vfo_cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
@ -784,7 +784,7 @@ int ft767_set_split_freq(RIG * rig, vfo_t vfo, freq_t tx_freq) {
retval = ft767_send_block_and_ack(rig, freq_cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
@ -793,13 +793,13 @@ int ft767_set_split_freq(RIG * rig, vfo_t vfo, freq_t tx_freq) {
retval = ft767_send_block_and_ack(rig, vfo_cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
}
return RIG_OK;
}
@ -814,7 +814,7 @@ int ft767_get_split_freq(RIG * rig, vfo_t vfo, freq_t * tx_freq) {
retval = ft767_get_update_data(rig); /* get whole shebang from rig */
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: get_update_data failed with status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
@ -831,10 +831,10 @@ int ft767_get_split_freq(RIG * rig, vfo_t vfo, freq_t * tx_freq) {
offset = STATUS_VFOA_FREQ;
break;
case RIG_VFO_MEM:
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __func__);
return RIG_OK;
default:
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __FUNCTION__, curr_vfo);
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __func__, curr_vfo);
return RIG_OK;
}
} else {
@ -876,10 +876,10 @@ int ft767_set_split_mode(RIG * rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_wid
change_vfo = RIG_VFO_A;
break;
case RIG_VFO_MEM:
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __func__);
return RIG_OK;
default:
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __FUNCTION__, curr_vfo);
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __func__, curr_vfo);
return RIG_OK;
}
} else {
@ -892,7 +892,7 @@ int ft767_set_split_mode(RIG * rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_wid
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
@ -901,7 +901,7 @@ int ft767_set_split_mode(RIG * rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_wid
retval = ft767_send_block_and_ack(rig, vfo_cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send vfo change 1 command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
@ -909,7 +909,7 @@ int ft767_set_split_mode(RIG * rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_wid
retval = ft767_send_block_and_ack(rig, mode_cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send mode command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
@ -918,13 +918,13 @@ int ft767_set_split_mode(RIG * rig, vfo_t vfo, rmode_t tx_mode, pbwidth_t tx_wid
retval = ft767_send_block_and_ack(rig, vfo_cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send vfo change 2command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
}
return RIG_OK;
}
@ -939,7 +939,7 @@ int ft767_get_split_mode(RIG * rig, vfo_t vfo, rmode_t * tx_mode, pbwidth_t * tx
retval = ft767_get_update_data(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: get_update_data failed with status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
@ -956,10 +956,10 @@ int ft767_get_split_mode(RIG * rig, vfo_t vfo, rmode_t * tx_mode, pbwidth_t * tx
offset = STATUS_VFOA_MODE;
break;
case RIG_VFO_MEM:
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __FUNCTION__);
rig_debug(RIG_DEBUG_ERR,"%s: error, in both split and memory modes\n", __func__);
return RIG_OK;
default:
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __FUNCTION__, curr_vfo);
rig_debug(RIG_DEBUG_ERR,"%s: error, unknown vfo value %d\n", __func__, curr_vfo);
return RIG_OK;
}
} else {
@ -1035,7 +1035,7 @@ int ft767_set_split_vfo(RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
@ -1049,7 +1049,7 @@ int ft767_set_split_vfo(RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send split command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
}
@ -1061,7 +1061,7 @@ int ft767_set_split_vfo(RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send set vfo command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
}
@ -1073,14 +1073,14 @@ int ft767_set_split_vfo(RIG * rig, vfo_t vfo, split_t split, vfo_t tx_vfo) {
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send set clar command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
return retval;
}
break;
@ -1098,7 +1098,7 @@ int ft767_get_split_vfo(RIG * rig, vfo_t vfo, split_t * split, vfo_t *tx_vfo) {
retval = ft767_get_update_data(rig); /* get whole shebang from rig */
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: get_update_data failed with status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
@ -1121,7 +1121,7 @@ int ft767_get_split_vfo(RIG * rig, vfo_t vfo, split_t * split, vfo_t *tx_vfo) {
default:
/* we don't know how to deal with MEM, anything else is an error */
/* TODO make sure this is what we want to do here */
rig_debug(RIG_DEBUG_ERR,"%s: current vfo is %d with split\n", __FUNCTION__, curr_vfo);
rig_debug(RIG_DEBUG_ERR,"%s: current vfo is %d with split\n", __func__, curr_vfo);
return -RIG_EINVAL;
break;
}
@ -1137,7 +1137,7 @@ int ft767_get_split_vfo(RIG * rig, vfo_t vfo, split_t * split, vfo_t *tx_vfo) {
*/
int ft767_enter_CAT(RIG *rig) {
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x00, CMD_CAT_SW};
rig_debug(RIG_DEBUG_TRACE, "%s: Entered\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s: Entered\n", __func__);
return ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
}
@ -1146,7 +1146,7 @@ int ft767_enter_CAT(RIG *rig) {
*/
int ft767_leave_CAT(RIG *rig) {
unsigned char cmd[YAESU_CMD_LENGTH] = { 0x00, 0x00, 0x00, 0x01, CMD_CAT_SW};
rig_debug(RIG_DEBUG_TRACE, "%s: Entered\n", __FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s: Entered\n", __func__);
return ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
}
@ -1223,7 +1223,7 @@ int ft767_send_block_and_ack(RIG *rig, unsigned char *cmd, size_t length)
default:
/* invalid or unknown sub-command */
rig_debug(RIG_DEBUG_ERR,"%s: invalid sub-command 0x%x for command 0x%x\n",
__FUNCTION__, cmd[3], cmd[4]);
__func__, cmd[3], cmd[4]);
return -RIG_EINVAL;
}
}
@ -1231,7 +1231,7 @@ int ft767_send_block_and_ack(RIG *rig, unsigned char *cmd, size_t length)
default:
/* invalid or unknown command */
rig_debug(RIG_DEBUG_ERR,"%s: invalid command 0x%x\n",
__FUNCTION__, cmd[4]);
__func__, cmd[4]);
return -RIG_EINVAL;
}
@ -1246,7 +1246,7 @@ int ft767_send_block_and_ack(RIG *rig, unsigned char *cmd, size_t length)
/* see if it matches the command we sent */
if (memcmp(cmd_echo_buf, cmd, YAESU_CMD_LENGTH)) {
rig_debug(RIG_DEBUG_ERR,"%s: Command echo doesn't match\n",
__FUNCTION__);
__func__);
return -RIG_EINVAL;
}
@ -1260,7 +1260,7 @@ int ft767_send_block_and_ack(RIG *rig, unsigned char *cmd, size_t length)
// update data
if (retval != replylen) {
rig_debug(RIG_DEBUG_ERR,"%s: Got unexpected number of bytes %d in response\n",
__FUNCTION__, retval);
__func__, retval);
return -RIG_EINVAL;
}
@ -1293,13 +1293,13 @@ int ft767_get_update_data(RIG *rig)
/* Entering CAT updates our data structures */
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
return retval;
}
@ -1320,26 +1320,26 @@ int ft767_set_split(RIG *rig, unsigned int split)
/* Entering CAT updates our data structures */
retval = ft767_enter_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: enter_CAT %d\n", __func__, retval);
return retval;
}
/* See whether we need to toggle */
curr_split = priv->update_data[STATUS_FLAGS] & STATUS_MASK_SPLIT;
rig_debug(RIG_DEBUG_TRACE,"%s called curr_split = %d, split = %d\n", __FUNCTION__, curr_split, split);
rig_debug(RIG_DEBUG_TRACE,"%s called curr_split = %d, split = %d\n", __func__, curr_split, split);
if (curr_split ^ split) {
retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: failed to send command: status %d\n",
__FUNCTION__, retval);
__func__, retval);
return retval;
}
}
retval = ft767_leave_CAT(rig);
if (retval < 0) {
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __FUNCTION__, retval);
rig_debug(RIG_DEBUG_ERR,"%s: leave_CAT %d\n", __func__, retval);
return retval;
}
@ -1508,7 +1508,7 @@ int rig2ctcss(RIG *rig, unsigned char tn, tone_t *tone) {
#endif
default:
rig_debug(RIG_DEBUG_ERR,"%s: Invalid tone value from rig: 0x%02x\n",
__FUNCTION__, tn);
__func__, tn);
return -RIG_EINVAL; /* sorry, wrong TONE */
break;
}

Wyświetl plik

@ -872,7 +872,7 @@ int ft847_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) {
break;
default:
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode/width: %s/%d, narrow: %d\n",
__FUNCTION__, rig_strrmode(mode), (int)width,
__func__, rig_strrmode(mode), (int)width,
(int)rig_passband_narrow(rig, mode));
return -RIG_EINVAL; /* sorry, wrong MODE/WIDTH combo */
}
@ -880,7 +880,7 @@ int ft847_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) {
if (width != RIG_PASSBAND_NORMAL &&
width != rig_passband_normal(rig, mode)) {
rig_debug(RIG_DEBUG_ERR,"%s: unsupported mode/width: %s/%d, narrow: %d\n",
__FUNCTION__, rig_strrmode(mode), (int)width,
__func__, rig_strrmode(mode), (int)width,
(int)rig_passband_narrow(rig, mode));
return -RIG_EINVAL; /* sorry, wrong MODE/WIDTH combo */
}

Wyświetl plik

@ -612,7 +612,7 @@ int ft980_open(RIG *rig)
struct ft980_priv_data *priv;
int retval, retry_count1=0;
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__func__);
rig->state.priv = calloc(1, sizeof (struct ft980_priv_data));
if (!rig->state.priv)
@ -646,7 +646,7 @@ int ft980_close(RIG *rig)
struct ft980_priv_data *priv = (struct ft980_priv_data *)rig->state.priv;
int retval, retry_count1=0;
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__FUNCTION__);
rig_debug(RIG_DEBUG_TRACE, "%s called\n",__func__);
do {
int retry_count2=0;

Wyświetl plik

@ -391,7 +391,7 @@ int vr5000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
if (retval < 1) {
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
__FUNCTION__,retval);
__func__,retval);
return retval < 0 ? retval : -RIG_EIO;
}
@ -420,7 +420,7 @@ int vr5000_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
if (retval < 1) {
rig_debug(RIG_DEBUG_ERR,"%s: read meter failed %d\n",
__FUNCTION__,retval);
__func__,retval);
return retval < 0 ? retval : -RIG_EIO;
}