pull/345/head
Michael Black W9MDB 2020-07-07 11:39:26 -05:00
rodzic 4177dde4e0
commit 5e801fd2b5
10 zmienionych plików z 95 dodań i 52 usunięć

Wyświetl plik

@ -410,12 +410,14 @@ static int dummy_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
if (vfo == RIG_VFO_A) { priv->curr->freq = freq; } if (vfo == RIG_VFO_A) { priv->curr->freq = freq; }
else if (vfo == RIG_VFO_B) { priv->curr->tx_freq = freq; } else if (vfo == RIG_VFO_B) { priv->curr->tx_freq = freq; }
if (!priv->split) if (!priv->split)
{ {
priv->curr->tx_freq = freq; priv->curr->tx_freq = freq;
} }
rig_debug(RIG_DEBUG_TRACE, "%s: curr->freq=%.0f, curr->tx_freq=%.0f\n", __func__, rig_debug(RIG_DEBUG_TRACE, "%s: curr->freq=%.0f, curr->tx_freq=%.0f\n",
__func__,
priv->curr->freq, priv->curr->tx_freq); priv->curr->freq, priv->curr->tx_freq);
return RIG_OK; return RIG_OK;
} }

Wyświetl plik

@ -376,7 +376,7 @@ static char *xml_parse(char *xml, char *value, int value_len)
xml_parse2(next, value, value_len); xml_parse2(next, value, value_len);
} }
if ( value && strstr(value, "faultString")) if (value && strstr(value, "faultString"))
{ {
rig_debug(RIG_DEBUG_ERR, "%s error:\n%s\n", __func__, value); rig_debug(RIG_DEBUG_ERR, "%s error:\n%s\n", __func__, value);
value[0] = 0; /* truncate to give empty response */ value[0] = 0; /* truncate to give empty response */

Wyświetl plik

@ -1575,7 +1575,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
switch (mode) switch (mode)
{ {
case RIG_MODE_PKTUSB: case RIG_MODE_PKTUSB:
// xFE xFE x6E xE0 x1A x06 x01 xFD switchs mod input from MIC to ACC // xFE xFE x6E xE0 x1A x06 x01 xFD switchs mod input from MIC to ACC
// This apparently works for IC-756ProIII but nobody has asked for it yet // This apparently works for IC-756ProIII but nobody has asked for it yet
icom_mode = RIG_MODE_USB; icom_mode = RIG_MODE_USB;

Wyświetl plik

@ -327,7 +327,8 @@ transaction_write:
// Seems some rigs (like TS-480) return "?" when RX is done while PTT=OFF // Seems some rigs (like TS-480) return "?" when RX is done while PTT=OFF
// So we'll skip the checks just on this one command for now // So we'll skip the checks just on this one command for now
// The TS-480 PC Control says RX; should return RX0; but it doesn't // The TS-480 PC Control says RX; should return RX0; but it doesn't
if (retval == RIG_OK && strncmp(cmdstr, "RX", 2) == 0) goto transaction_quit; // We may eventually want to verify PTT with rig_get_ptt instead
if (retval == RIG_OK && strncmp(cmdstr, "RX", 2) == 0) { goto transaction_quit; }
if (!datasize) if (!datasize)
{ {
@ -668,18 +669,20 @@ int kenwood_init(RIG *rig)
priv = rig->state.priv; priv = rig->state.priv;
memset(priv, 0x00, sizeof(struct kenwood_priv_data)); memset(priv, 0x00, sizeof(struct kenwood_priv_data));
if (RIG_IS_XG3) if (RIG_IS_XG3)
{ {
priv->verify_cmd[0] = caps->cmdtrm; priv->verify_cmd[0] = caps->cmdtrm;
priv->verify_cmd[1] ='\0'; priv->verify_cmd[1] = '\0';
} }
else else
{ {
priv->verify_cmd[0] ='I'; priv->verify_cmd[0] = 'I';
priv->verify_cmd[1] ='D'; priv->verify_cmd[1] = 'D';
priv->verify_cmd[2] = caps->cmdtrm; priv->verify_cmd[2] = caps->cmdtrm;
priv->verify_cmd[3] ='\0'; priv->verify_cmd[3] = '\0';
} }
priv->split = RIG_SPLIT_OFF; priv->split = RIG_SPLIT_OFF;
priv->trn_state = -1; priv->trn_state = -1;
priv->curr_mode = 0; priv->curr_mode = 0;
@ -731,7 +734,8 @@ int kenwood_open(RIG *rig)
rig_debug(RIG_DEBUG_TRACE, "%s: got ID so try PS\n", __func__); rig_debug(RIG_DEBUG_TRACE, "%s: got ID so try PS\n", __func__);
err = rig_get_powerstat(rig, &powerstat); err = rig_get_powerstat(rig, &powerstat);
if (err == RIG_OK && powerstat == 0 && priv->poweron == 0 && rig->state.auto_power_on) if (err == RIG_OK && powerstat == 0 && priv->poweron == 0
&& rig->state.auto_power_on)
{ {
rig_debug(RIG_DEBUG_TRACE, "%s: got PS0 so powerup\n", __func__); rig_debug(RIG_DEBUG_TRACE, "%s: got PS0 so powerup\n", __func__);
rig_set_powerstat(rig, 1); rig_set_powerstat(rig, 1);
@ -741,6 +745,7 @@ int kenwood_open(RIG *rig)
err = RIG_OK; // reset our err back to OK for later checks err = RIG_OK; // reset our err back to OK for later checks
} }
if (err == -RIG_ETIMEOUT && rig->state.auto_power_on) if (err == -RIG_ETIMEOUT && rig->state.auto_power_on)
{ {
// Ensure rig is on // Ensure rig is on
@ -748,6 +753,7 @@ int kenwood_open(RIG *rig)
/* Try get id again */ /* Try get id again */
err = kenwood_get_id(rig, id); err = kenwood_get_id(rig, id);
} }
if (RIG_OK != err) if (RIG_OK != err)
{ {
rig_debug(RIG_DEBUG_ERR, rig_debug(RIG_DEBUG_ERR,
@ -879,6 +885,7 @@ int kenwood_open(RIG *rig)
vfo_t tx_vfo; vfo_t tx_vfo;
/* get current AI state so it can be restored */ /* get current AI state so it can be restored */
kenwood_get_trn(rig, &priv->trn_state); /* ignore errors */ kenwood_get_trn(rig, &priv->trn_state); /* ignore errors */
/* Currently we cannot cope with AI mode so turn it off in /* Currently we cannot cope with AI mode so turn it off in
case last client left it on */ case last client left it on */
if (priv->trn_state != RIG_TRN_OFF) if (priv->trn_state != RIG_TRN_OFF)
@ -891,10 +898,12 @@ int kenwood_open(RIG *rig)
{ {
// call get_split to fill in current split and tx_vfo status // call get_split to fill in current split and tx_vfo status
retval = kenwood_get_split_vfo_if(rig, RIG_VFO_A, &split, &tx_vfo); retval = kenwood_get_split_vfo_if(rig, RIG_VFO_A, &split, &tx_vfo);
if (retval != RIG_OK) if (retval != RIG_OK)
{ {
rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval)); rig_debug(RIG_DEBUG_ERR, "%s: %s\n", __func__, rigerror(retval));
} }
priv->tx_vfo = tx_vfo; priv->tx_vfo = tx_vfo;
rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->tx_vfo=%s\n", __func__, rig_debug(RIG_DEBUG_VERBOSE, "%s: priv->tx_vfo=%s\n", __func__,
rig_strvfo(priv->tx_vfo)); rig_strvfo(priv->tx_vfo));
@ -3438,7 +3447,8 @@ int kenwood_set_trn(RIG *rig, int trn)
case RIG_MODEL_THD7A: case RIG_MODEL_THD7A:
case RIG_MODEL_THD74: case RIG_MODEL_THD74:
return kenwood_transaction(rig, (trn == RIG_TRN_RIG) ? "AI 1" : "AI 0", buf, sizeof buf); return kenwood_transaction(rig, (trn == RIG_TRN_RIG) ? "AI 1" : "AI 0", buf,
sizeof buf);
break; break;
default: default:

Wyświetl plik

@ -435,12 +435,12 @@ th_set_vfo(RIG *rig, vfo_t vfo)
case RIG_VFO_A: case RIG_VFO_A:
case RIG_VFO_VFO: case RIG_VFO_VFO:
case RIG_VFO_MAIN: case RIG_VFO_MAIN:
strncpy (cmd, "BC 0", sizeof cmd); strncpy(cmd, "BC 0", sizeof cmd);
break; break;
case RIG_VFO_B: case RIG_VFO_B:
case RIG_VFO_SUB: case RIG_VFO_SUB:
strncpy (cmd, "BC 1", sizeof cmd); strncpy(cmd, "BC 1", sizeof cmd);
break; break;
default: default:
@ -463,29 +463,31 @@ th_set_vfo(RIG *rig, vfo_t vfo)
case RIG_VFO_A: case RIG_VFO_A:
case RIG_VFO_VFO: case RIG_VFO_VFO:
case RIG_VFO_MAIN: case RIG_VFO_MAIN:
strncpy (cmd, "VMC 0,0", sizeof cmd); strncpy(cmd, "VMC 0,0", sizeof cmd);
break; break;
case RIG_VFO_B: case RIG_VFO_B:
case RIG_VFO_SUB: case RIG_VFO_SUB:
strncpy (cmd, "VMC 1,0", sizeof cmd); strncpy(cmd, "VMC 1,0", sizeof cmd);
break; break;
case RIG_VFO_MEM: case RIG_VFO_MEM:
strncpy (cmd, "BC", sizeof cmd); strncpy(cmd, "BC", sizeof cmd);
retval = kenwood_transaction (rig, cmd, cmd, sizeof cmd); retval = kenwood_transaction(rig, cmd, cmd, sizeof cmd);
if (retval != RIG_OK) if (retval != RIG_OK)
{ {
return retval; return retval;
} }
if (rig->caps->rig_model == RIG_MODEL_THF7E || if (rig->caps->rig_model == RIG_MODEL_THF7E ||
rig->caps->rig_model == RIG_MODEL_THF6A) rig->caps->rig_model == RIG_MODEL_THF6A)
{ {
snprintf (cmd, sizeof cmd, "VMC %c,1", cmd[3]); snprintf(cmd, sizeof cmd, "VMC %c,1", cmd[3]);
} }
else else
{ {
snprintf (cmd, sizeof cmd, "VMC %c,2", cmd[3]); snprintf(cmd, sizeof cmd, "VMC %c,2", cmd[3]);
} }
break; break;
@ -737,7 +739,7 @@ int th_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
} }
/* Set VFO mode. To be done for TX vfo also? */ /* Set VFO mode. To be done for TX vfo also? */
snprintf (vfobuf, sizeof vfobuf, "VMC %d,0", vfonum); snprintf(vfobuf, sizeof vfobuf, "VMC %d,0", vfonum);
retval = kenwood_transaction(rig, vfobuf, vfobuf, sizeof vfobuf); retval = kenwood_transaction(rig, vfobuf, vfobuf, sizeof vfobuf);
if (retval != RIG_OK) if (retval != RIG_OK)
@ -745,7 +747,7 @@ int th_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo)
return retval; return retval;
} }
snprintf (vfobuf, sizeof vfobuf, "BC %d,%d", vfonum, txvfonum); snprintf(vfobuf, sizeof vfobuf, "BC %d,%d", vfonum, txvfonum);
retval = kenwood_transaction(rig, vfobuf, NULL, 0); retval = kenwood_transaction(rig, vfobuf, NULL, 0);
if (retval != RIG_OK) if (retval != RIG_OK)
@ -804,8 +806,8 @@ int
th_set_trn(RIG *rig, int trn) th_set_trn(RIG *rig, int trn)
{ {
char buf[5]; char buf[5];
snprintf (buf, sizeof buf, "AI %c", RIG_TRN_RIG == trn ? '1' : '0'); snprintf(buf, sizeof buf, "AI %c", RIG_TRN_RIG == trn ? '1' : '0');
return kenwood_transaction (rig, buf, buf, sizeof buf); return kenwood_transaction(rig, buf, buf, sizeof buf);
} }
/* /*
@ -1417,8 +1419,8 @@ th_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone)
} }
i += (i == 0) ? 1 : 2; /* Correct for TH-D7A index anomally */ i += (i == 0) ? 1 : 2; /* Correct for TH-D7A index anomally */
snprintf (tonebuf, sizeof tonebuf, "TN %02d", i); snprintf(tonebuf, sizeof tonebuf, "TN %02d", i);
return kenwood_transaction (rig, tonebuf, tonebuf, sizeof tonebuf); return kenwood_transaction(rig, tonebuf, tonebuf, sizeof tonebuf);
} }
/* /*
@ -1495,8 +1497,8 @@ th_set_ctcss_sql(RIG *rig, vfo_t vfo, tone_t tone)
} }
i += (i == 0) ? 1 : 2; /* Correct for TH-D7A index anomally */ i += (i == 0) ? 1 : 2; /* Correct for TH-D7A index anomally */
snprintf (tonebuf, sizeof tonebuf, "CTN %02d", i); snprintf(tonebuf, sizeof tonebuf, "CTN %02d", i);
return kenwood_transaction (rig, tonebuf, tonebuf, sizeof tonebuf); return kenwood_transaction(rig, tonebuf, tonebuf, sizeof tonebuf);
} }
/* /*
@ -1565,7 +1567,7 @@ th_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
if (code == 0) if (code == 0)
{ {
snprintf (codebuf, sizeof codebuf, "DCS 0"); snprintf(codebuf, sizeof codebuf, "DCS 0");
return kenwood_transaction(rig, codebuf, codebuf, sizeof codebuf); return kenwood_transaction(rig, codebuf, codebuf, sizeof codebuf);
} }
@ -1582,14 +1584,16 @@ th_set_dcs_sql(RIG *rig, vfo_t vfo, tone_t code)
return -RIG_EINVAL; return -RIG_EINVAL;
} }
snprintf (codebuf, sizeof codebuf, "DCS 1"); snprintf(codebuf, sizeof codebuf, "DCS 1");
if ((retval = kenwood_transaction(rig, codebuf, codebuf, sizeof codebuf)) != RIG_OK)
if ((retval = kenwood_transaction(rig, codebuf, codebuf,
sizeof codebuf)) != RIG_OK)
{ {
return retval; return retval;
} }
snprintf(codebuf, sizeof codebuf, "DCSN %04d", (i + 1) * 10); snprintf(codebuf, sizeof codebuf, "DCSN %04d", (i + 1) * 10);
return kenwood_transaction (rig, codebuf, codebuf, sizeof codebuf); return kenwood_transaction(rig, codebuf, codebuf, sizeof codebuf);
} }
/* /*
@ -1724,8 +1728,8 @@ th_set_mem(RIG *rig, vfo_t vfo, int ch)
return retval; return retval;
} }
snprintf (membuf, sizeof membuf, "MC %c,%03i", vsel, ch); snprintf(membuf, sizeof membuf, "MC %c,%03i", vsel, ch);
return kenwood_transaction (rig, membuf, membuf, sizeof membuf); return kenwood_transaction(rig, membuf, membuf, sizeof membuf);
} }
/* Get mem works only when the display is /* Get mem works only when the display is
@ -1801,7 +1805,8 @@ th_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
{ {
char buf[3]; char buf[3];
rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __func__); rig_debug(RIG_DEBUG_TRACE, "%s: called\n", __func__);
return kenwood_transaction(rig, (ptt == RIG_PTT_ON) ? "TX" : "RX", buf, sizeof buf); return kenwood_transaction(rig, (ptt == RIG_PTT_ON) ? "TX" : "RX", buf,
sizeof buf);
} }
int th_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd) int th_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd)
@ -2497,15 +2502,15 @@ int th_set_ant(RIG *rig, vfo_t vfo, ant_t ant, value_t option)
switch (ant) switch (ant)
{ {
case RIG_ANT_1: case RIG_ANT_1:
strncpy (cmd, "ANT 0", sizeof cmd); strncpy(cmd, "ANT 0", sizeof cmd);
break; break;
case RIG_ANT_2: case RIG_ANT_2:
strncpy (cmd, "ANT 1", sizeof cmd); strncpy(cmd, "ANT 1", sizeof cmd);
break; break;
case RIG_ANT_3: case RIG_ANT_3:
strncpy (cmd, "ANT 2", sizeof cmd); strncpy(cmd, "ANT 2", sizeof cmd);
break; break;
default: default:

Wyświetl plik

@ -850,52 +850,72 @@ int ft1000mp_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{ {
case RIG_MODE_AM: case RIG_MODE_AM:
cmd_index = FT1000MP_NATIVE_MODE_SET_AM; cmd_index = FT1000MP_NATIVE_MODE_SET_AM;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_AM_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_AM_B; }
break; break;
case RIG_MODE_CW: case RIG_MODE_CW:
cmd_index = FT1000MP_NATIVE_MODE_SET_CWR; cmd_index = FT1000MP_NATIVE_MODE_SET_CWR;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_CWR_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_CWR_B; }
break; break;
case RIG_MODE_CWR: case RIG_MODE_CWR:
cmd_index = FT1000MP_NATIVE_MODE_SET_CW; cmd_index = FT1000MP_NATIVE_MODE_SET_CW;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_CW_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_CW_B; }
break; break;
case RIG_MODE_USB: case RIG_MODE_USB:
cmd_index = FT1000MP_NATIVE_MODE_SET_USB; cmd_index = FT1000MP_NATIVE_MODE_SET_USB;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_USB_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_USB_B; }
break; break;
case RIG_MODE_LSB: case RIG_MODE_LSB:
cmd_index = FT1000MP_NATIVE_MODE_SET_LSB; cmd_index = FT1000MP_NATIVE_MODE_SET_LSB;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_LSB_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_LSB_B; }
break; break;
case RIG_MODE_FM: case RIG_MODE_FM:
cmd_index = FT1000MP_NATIVE_MODE_SET_FM; cmd_index = FT1000MP_NATIVE_MODE_SET_FM;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B; }
break; break;
case RIG_MODE_RTTY: case RIG_MODE_RTTY:
cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB; cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_LSB_B; }
break; break;
case RIG_MODE_RTTYR: case RIG_MODE_RTTYR:
cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB; cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_RTTY_USB_B; }
break; break;
case RIG_MODE_PKTLSB: case RIG_MODE_PKTLSB:
cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB; cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_LSB_B; }
break; break;
case RIG_MODE_PKTFM: case RIG_MODE_PKTFM:
cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_FM; cmd_index = FT1000MP_NATIVE_MODE_SET_DATA_FM;
if (vfo == RIG_VFO_B) cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B;
if (vfo == RIG_VFO_B) { cmd_index = FT1000MP_NATIVE_MODE_SET_FM_B; }
break; break;
default: default:
@ -1558,14 +1578,14 @@ int ft1000mp_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
return -RIG_EINVAL; /* sorry, wrong VFO */ return -RIG_EINVAL; /* sorry, wrong VFO */
} }
rig_get_freq(rig,RIG_VFO_B,&tx_freq); rig_get_freq(rig, RIG_VFO_B, &tx_freq);
// manual says VFO_A=Tx and VFO_B=Rx but testing shows otherwise // manual says VFO_A=Tx and VFO_B=Rx but testing shows otherwise
rig->state.current_vfo = RIG_VFO_A; rig->state.current_vfo = RIG_VFO_A;
rig->state.tx_vfo = RIG_VFO_B; rig->state.tx_vfo = RIG_VFO_B;
ft1000mp_send_priv_cmd(rig, FT1000MP_NATIVE_AB); // Copy A to B ft1000mp_send_priv_cmd(rig, FT1000MP_NATIVE_AB); // Copy A to B
ft1000mp_send_priv_cmd(rig, FT1000MP_NATIVE_VFO_A); // make A active ft1000mp_send_priv_cmd(rig, FT1000MP_NATIVE_VFO_A); // make A active
ft1000mp_send_priv_cmd(rig, cmd_index); ft1000mp_send_priv_cmd(rig, cmd_index);
rig_set_freq(rig,RIG_VFO_B,tx_freq); // restore orig frequency rig_set_freq(rig, RIG_VFO_B, tx_freq); // restore orig frequency
return RIG_OK; return RIG_OK;
} }

Wyświetl plik

@ -227,8 +227,10 @@ gs232b_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el)
*/ */
// There's a 12PR1A rotor that only returns AZ so we may only get AZ=xxx // There's a 12PR1A rotor that only returns AZ so we may only get AZ=xxx
if (sscanf(posbuf, "AZ=%d EL=%d", &int_az, &int_el) == 0) if (sscanf(posbuf, "AZ=%d EL=%d", &int_az, &int_el) == 0)
{ // only give error if we didn't parse anything {
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s', expected AZ=xxx EL=xxx\n", __func__, // only give error if we didn't parse anything
rig_debug(RIG_DEBUG_ERR, "%s: wrong reply '%s', expected AZ=xxx EL=xxx\n",
__func__,
posbuf); posbuf);
return -RIG_EPROTO; return -RIG_EPROTO;
} }

Wyświetl plik

@ -567,6 +567,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
{ {
return -RIG_EINVAL; //value format error return -RIG_EINVAL; //value format error
} }
rs->auto_power_on = val_i ? 1 : 0; rs->auto_power_on = val_i ? 1 : 0;
break; break;
@ -575,6 +576,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
{ {
return -RIG_EINVAL; //value format error return -RIG_EINVAL; //value format error
} }
rs->auto_disable_screensaver = val_i ? 1 : 0; rs->auto_disable_screensaver = val_i ? 1 : 0;
break; break;

Wyświetl plik

@ -1313,7 +1313,8 @@ int HAMLIB_API rig_get_cache_timeout_ms(RIG *rig, hamlib_cache_t selection)
return rig->state.cache.timeout_ms; return rig->state.cache.timeout_ms;
} }
int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection, int ms) int HAMLIB_API rig_set_cache_timeout_ms(RIG *rig, hamlib_cache_t selection,
int ms)
{ {
rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d, ms=%d\n", __func__, rig_debug(RIG_DEBUG_TRACE, "%s: called selection=%d, ms=%d\n", __func__,
selection, ms); selection, ms);
@ -1393,7 +1394,7 @@ int HAMLIB_API parse_hoststr(char *hoststr, char host[256], char port[6])
if (strncasecmp(hoststr, "com", 3) == 0) { return -1; } if (strncasecmp(hoststr, "com", 3) == 0) { return -1; }
// escaped COM port like \\.\COM3 // escaped COM port like \\.\COM3
if (strstr(hoststr,"\\\\.\\")) { return -1; } if (strstr(hoststr, "\\\\.\\")) { return -1; }
// bracketed IPV6 with optional port // bracketed IPV6 with optional port
int n = sscanf(hoststr, "[%255[^]]]:%5s", host, port); int n = sscanf(hoststr, "[%255[^]]]:%5s", host, port);

Wyświetl plik

@ -1054,5 +1054,6 @@ int find_on_list(char **list, char *what)
i++; i++;
} }
} }
return i; return i;
} }