kopia lustrzana https://github.com/Hamlib/Hamlib
astyle files getting ready for WSJT-x-2.7.0rc1
rodzic
f55e7b8348
commit
dad55ef148
|
@ -120,7 +120,8 @@ int expert_flushbuffer(AMP *amp)
|
|||
return rig_flush(&rs->ampport);
|
||||
}
|
||||
|
||||
int expert_transaction(AMP *amp, const unsigned char *cmd, int cmd_len, unsigned char *response, int response_len)
|
||||
int expert_transaction(AMP *amp, const unsigned char *cmd, int cmd_len,
|
||||
unsigned char *response, int response_len)
|
||||
{
|
||||
struct amp_state *rs;
|
||||
int err;
|
||||
|
@ -139,7 +140,9 @@ int expert_transaction(AMP *amp, const unsigned char *cmd, int cmd_len, unsigned
|
|||
rs = &->state;
|
||||
|
||||
cmdbuf[0] = cmdbuf[1] = cmdbuf[2] = 0x55;
|
||||
for(int i=0;i<cmd_len;++i) checksum += cmd[i];
|
||||
|
||||
for (int i = 0; i < cmd_len; ++i) { checksum += cmd[i]; }
|
||||
|
||||
checksum = checksum % 256;
|
||||
cmdbuf[3] = cmd_len;
|
||||
memcpy(&cmdbuf[4], cmd, cmd_len);
|
||||
|
@ -155,7 +158,8 @@ int expert_transaction(AMP *amp, const unsigned char *cmd, int cmd_len, unsigned
|
|||
response[0] = 0;
|
||||
// read the 4-byte header x55x55x55xXX where XX is the hex # of bytes
|
||||
len = read_block_direct(&rs->ampport, (unsigned char *) response, 4);
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: len=%d, bytes=%02x\n", __func__, len, response[3]);
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: len=%d, bytes=%02x\n", __func__, len,
|
||||
response[3]);
|
||||
|
||||
if (len < 0)
|
||||
{
|
||||
|
@ -163,7 +167,9 @@ int expert_transaction(AMP *amp, const unsigned char *cmd, int cmd_len, unsigned
|
|||
rigerror(len));
|
||||
return len;
|
||||
}
|
||||
if (len == 4) bytes = response[3];
|
||||
|
||||
if (len == 4) { bytes = response[3]; }
|
||||
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: bytes=%d\n", __func__, bytes);
|
||||
len = read_block_direct(&rs->ampport, (unsigned char *) response, bytes - 3);
|
||||
dump_hex(response, len);
|
||||
|
@ -357,6 +363,7 @@ int expert_get_level(AMP *amp, setting_t level, value_t *val)
|
|||
switch (level)
|
||||
{
|
||||
case AMP_LEVEL_SWR:
|
||||
|
||||
//nargs = sscanf(responsebuf, "^SW%f", &float_value);
|
||||
|
||||
if (nargs != 1)
|
||||
|
@ -371,6 +378,7 @@ int expert_get_level(AMP *amp, setting_t level, value_t *val)
|
|||
|
||||
case AMP_LEVEL_NH:
|
||||
case AMP_LEVEL_PF:
|
||||
|
||||
//nargs = sscanf(responsebuf, "^DF%d,%d", &int_value, &int_value2);
|
||||
|
||||
if (nargs != 2)
|
||||
|
|
|
@ -295,7 +295,7 @@ static int aclog_transaction(RIG *rig, char *cmd, char *value,
|
|||
// we get an unknown response if function does not exist
|
||||
if (strstr(xml, "UNKNOWN")) { set_transaction_inactive(rig); RETURNFUNC(RIG_ENAVAIL); }
|
||||
|
||||
if (value) strncpy(value, xml, value_len);
|
||||
if (value) { strncpy(value, xml, value_len); }
|
||||
|
||||
}
|
||||
while (((value && strlen(value) == 0))
|
||||
|
|
|
@ -2053,8 +2053,10 @@ static int netrigctl_get_powerstat(RIG *rig, powerstat_t *status)
|
|||
if (ret > 0)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
// see if there is a RPRT answer to make SDR++ happy
|
||||
if (strstr(buf,"RPRT")) offset=4;
|
||||
if (strstr(buf, "RPRT")) { offset = 4; }
|
||||
|
||||
*status = atoi(&buf[offset]);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -224,14 +224,18 @@ collision_retry:
|
|||
switch (buf[retval - 1])
|
||||
{
|
||||
case COL:
|
||||
|
||||
/* Collision */
|
||||
// IC746 for example responds 0xfc when tuning is active so we will retry
|
||||
if (collision_retry++ < 20)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: collision retry#%d\n", __func__, collision_retry);
|
||||
hl_usleep(500*1000); // 500ms 20 times for ~15 second max before we back out for a retry if needed
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: collision retry#%d\n", __func__,
|
||||
collision_retry);
|
||||
hl_usleep(500 *
|
||||
1000); // 500ms 20 times for ~15 second max before we back out for a retry if needed
|
||||
goto collision_retry;
|
||||
}
|
||||
|
||||
set_transaction_inactive(rig);
|
||||
RETURNFUNC(-RIG_BUSBUSY);
|
||||
|
||||
|
|
|
@ -1653,9 +1653,11 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
if (priv->x25cmdfails < 0) priv->x25cmdfails = 1;
|
||||
if (priv->x25cmdfails < 0) { priv->x25cmdfails = 1; }
|
||||
|
||||
rig_debug(RIG_DEBUG_TRACE,
|
||||
"%s: rig probe shows 0x25 CI-V cmd not available for this rig/firmware\n", __func__);
|
||||
"%s: rig probe shows 0x25 CI-V cmd not available for this rig/firmware\n",
|
||||
__func__);
|
||||
}
|
||||
|
||||
freq_len--; // 0x25 cmd is 1 byte longer than 0x03 cmd
|
||||
|
@ -5073,10 +5075,12 @@ int icom_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
|
|||
|
||||
ENTERFUNC;
|
||||
|
||||
do {
|
||||
do
|
||||
{
|
||||
retval = icom_transaction(rig, C_CTL_PTT, S_PTT, NULL, 0,
|
||||
pttbuf, &ptt_len);
|
||||
} while(--retry >0 && retval != RIG_OK);
|
||||
}
|
||||
while (--retry > 0 && retval != RIG_OK);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
|
|
|
@ -144,30 +144,39 @@ int id5100_set_vfo(RIG *rig, vfo_t vfo)
|
|||
//struct icom_priv_data *priv = (struct icom_priv_data *) rs->priv;
|
||||
|
||||
ENTERFUNC;
|
||||
if (vfo == RIG_VFO_CURR) vfo = rig->state.current_vfo;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) { vfo = rig->state.current_vfo; }
|
||||
|
||||
if (vfo == RIG_VFO_A || vfo == RIG_VFO_B)
|
||||
{
|
||||
// then we need to turn off dual watch
|
||||
|
||||
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH, 0)))
|
||||
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
|
||||
0)))
|
||||
{
|
||||
RETURNFUNC2(retval);
|
||||
}
|
||||
}
|
||||
else if (vfo == RIG_VFO_MAIN || vfo == RIG_VFO_SUB)
|
||||
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH, 1)))
|
||||
if (RIG_OK != (retval = icom_set_func(rig, RIG_VFO_CURR, RIG_FUNC_DUAL_WATCH,
|
||||
1)))
|
||||
{
|
||||
RETURNFUNC2(retval);
|
||||
}
|
||||
|
||||
int myvfo = S_MAIN;
|
||||
|
||||
if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB)
|
||||
{
|
||||
myvfo = S_SUB;
|
||||
}
|
||||
if (RIG_OK != (retval = icom_transaction(rig, C_SET_VFO, myvfo, NULL, 0, ackbuf, &ack_len)))
|
||||
|
||||
if (RIG_OK != (retval = icom_transaction(rig, C_SET_VFO, myvfo, NULL, 0, ackbuf,
|
||||
&ack_len)))
|
||||
{
|
||||
RETURNFUNC2(retval);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -182,7 +191,10 @@ int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s\n", __func__, rig_strvfo(vfo));
|
||||
|
||||
if (vfo == RIG_VFO_CURR || vfo == RIG_VFO_A || vfo == RIG_VFO_B)
|
||||
{
|
||||
return icom_set_vfo(rig, vfo);
|
||||
}
|
||||
|
||||
if (vfo == RIG_VFO_MAIN)
|
||||
{
|
||||
retval = RIG_OK;
|
||||
|
@ -191,6 +203,7 @@ int id5100_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo)
|
|||
{
|
||||
retval = RIG_OK;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ static int jst145_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
struct jst145_priv_data *priv = rig->state.priv;
|
||||
vfo_t save_vfo = rig->state.current_vfo;
|
||||
|
||||
if (vfo == RIG_VFO_CURR) vfo = save_vfo;
|
||||
if (vfo == RIG_VFO_CURR) { vfo = save_vfo; }
|
||||
|
||||
SNPRINTF(freqbuf, sizeof(freqbuf), "F%08u%c\r", (unsigned)(freq),
|
||||
vfo == RIG_VFO_A ? 'A' : 'B');
|
||||
|
@ -421,7 +421,7 @@ static int jst145_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s curr_vfo=%s\n", __func__,
|
||||
rig_strvfo(vfo), rig_strvfo(save_vfo));
|
||||
|
||||
if (vfo == RIG_VFO_CURR) vfo = save_vfo;
|
||||
if (vfo == RIG_VFO_CURR) { vfo = save_vfo; }
|
||||
|
||||
if (save_vfo != vfo)
|
||||
{
|
||||
|
|
|
@ -175,6 +175,7 @@ int elecraft_open(RIG *rig)
|
|||
}
|
||||
|
||||
priv->save_k2_ext_lvl = -1; // so we don't restore if not neeede
|
||||
|
||||
if (rig->caps->rig_model != RIG_MODEL_XG3) // XG3 doesn't have extended
|
||||
{
|
||||
err = elecraft_get_extension_level(rig, "K2", &priv->save_k2_ext_lvl);
|
||||
|
@ -185,6 +186,7 @@ int elecraft_open(RIG *rig)
|
|||
rigerror(err));
|
||||
return err;
|
||||
}
|
||||
|
||||
// turn on k2 extended to get PC values in more resolution
|
||||
err = kenwood_transaction(rig, "K22;", NULL, 0);
|
||||
|
||||
|
|
|
@ -549,8 +549,9 @@ int ic10_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
|
|||
/* QRP QDX should be 37 bytes but used only 1 byte for p14 instead of 2 bytes */
|
||||
/* 12345678901234567890123456789012345678 */
|
||||
offset = 5;
|
||||
if (iflen == 36) offset = 8; // QRP QDX gets completely bogus length
|
||||
else if (iflen == 37) offset = 9; // just in case somebody does this add p13/p14x2/p15
|
||||
|
||||
if (iflen == 36) { offset = 8; } // QRP QDX gets completely bogus length
|
||||
else if (iflen == 37) { offset = 9; } // just in case somebody does this add p13/p14x2/p15
|
||||
|
||||
*ptt = infobuf[iflen - offset] == '0' ? RIG_PTT_OFF : RIG_PTT_ON;
|
||||
|
||||
|
|
|
@ -504,7 +504,8 @@ transaction_read:
|
|||
*/
|
||||
if (priv->question_mark_response_means_rejected)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (get): '%s'\n", __func__,cmdstr);
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: Command rejected by the rig (get): '%s'\n",
|
||||
__func__, cmdstr);
|
||||
RETURNFUNC(-RIG_ERJCTED);
|
||||
}
|
||||
|
||||
|
@ -544,6 +545,7 @@ transaction_read:
|
|||
if (datasize)
|
||||
{
|
||||
char *ps_cmd;
|
||||
|
||||
if (priv->ps_cmd_wakeup_data)
|
||||
{
|
||||
ps_cmd = ";;;;PS";
|
||||
|
@ -5123,6 +5125,7 @@ int kenwood_get_powerstat(RIG *rig, powerstat_t *status)
|
|||
}
|
||||
|
||||
char *ps_cmd;
|
||||
|
||||
if (priv->ps_cmd_wakeup_data)
|
||||
{
|
||||
ps_cmd = ";;;;PS";
|
||||
|
|
|
@ -409,6 +409,7 @@ static int ts2000_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_AGC:
|
||||
|
||||
/* Possible values for TS-2000 are 0(=off)-020(=slow) */
|
||||
|
||||
switch (val.i)
|
||||
|
@ -813,24 +814,29 @@ static int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
int *value;
|
||||
int alc;
|
||||
|
||||
switch (level) {
|
||||
switch (level)
|
||||
{
|
||||
case RIG_LEVEL_SWR:
|
||||
meter = 1;
|
||||
value = &swr;
|
||||
break;
|
||||
|
||||
case RIG_LEVEL_COMP_METER:
|
||||
meter = 2;
|
||||
value = ∁
|
||||
break;
|
||||
|
||||
case RIG_LEVEL_ALC:
|
||||
meter = 3;
|
||||
value = &alc;
|
||||
break;
|
||||
|
||||
default:
|
||||
RETURNFUNC(-RIG_EINVAL);
|
||||
}
|
||||
|
||||
retval = ts2000_read_meter(rig, meter, value);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
RETURNFUNC(retval);
|
||||
|
@ -896,6 +902,7 @@ static int ts2000_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
{
|
||||
val->f = (float) raw_value / 30.0f;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1138,7 +1145,8 @@ static int ts2000_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
RETURNFUNC(retval);
|
||||
}
|
||||
|
||||
static int ts2000_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
||||
static int ts2000_get_ext_level(RIG *rig, vfo_t vfo, token_t token,
|
||||
value_t *val)
|
||||
{
|
||||
int retval;
|
||||
int value;
|
||||
|
|
|
@ -252,7 +252,8 @@ static int ts590_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
|
|||
RETURNFUNC(kenwood_transaction(rig, buf, NULL, 0));
|
||||
|
||||
case RIG_FUNC_TUNER:
|
||||
SNPRINTF(buf, sizeof(buf), "AC%c%c0", (status == 0) ? '0' : '1', (status == 0) ? '0' : '1');
|
||||
SNPRINTF(buf, sizeof(buf), "AC%c%c0", (status == 0) ? '0' : '1',
|
||||
(status == 0) ? '0' : '1');
|
||||
RETURNFUNC(kenwood_transaction(rig, buf, NULL, 0));
|
||||
|
||||
default:
|
||||
|
@ -339,6 +340,7 @@ static int ts590_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
break;
|
||||
|
||||
case RIG_LEVEL_AGC:
|
||||
|
||||
/* Possible values for TS-2000 are 0(=off)-020(=slow) */
|
||||
|
||||
switch (val.i)
|
||||
|
@ -380,6 +382,7 @@ static int ts590_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val)
|
|||
{
|
||||
kenwood_val = val.f * 20.0f;
|
||||
}
|
||||
|
||||
SNPRINTF(levelbuf, sizeof(levelbuf), "ML%03d", kenwood_val);
|
||||
break;
|
||||
|
||||
|
@ -642,6 +645,7 @@ static int ts590_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
{
|
||||
val->f = (float) raw_value / 20.0f;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -972,6 +976,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 37, 1, val.i);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_DSP_TX_EQUALIZER:
|
||||
|
@ -988,6 +993,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 36, 1, val.i);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_DSP_TX_SSB_AM_LOW_CUT_FILTER:
|
||||
|
@ -1004,6 +1010,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 31, 1, val.i);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_DSP_TX_SSB_AM_HIGH_CUT_FILTER:
|
||||
|
@ -1020,6 +1027,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 32, 1, val.i);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_DSP_TX_SSB_DATA_LOW_CUT_FILTER:
|
||||
|
@ -1036,6 +1044,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 33, 1, val.i);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_DSP_TX_SSB_DATA_HIGH_CUT_FILTER:
|
||||
|
@ -1052,6 +1061,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 34, 1, val.i);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_BEEP_VOLUME:
|
||||
|
@ -1068,6 +1078,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 5, 2, (int) val.f);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_TX_SIDETONE_VOLUME:
|
||||
|
@ -1084,6 +1095,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 6, 2, (int) val.f);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_ACC2_AUDIO_INPUT_LEVEL:
|
||||
|
@ -1100,6 +1112,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 73, 1, (int) val.f);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_ACC2_AUDIO_OUTPUT_LEVEL:
|
||||
|
@ -1116,6 +1129,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 74, 1, (int) val.f);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_USB_AUDIO_INPUT_LEVEL:
|
||||
|
@ -1132,6 +1146,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 71, 1, (int) val.f);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TOK_LEVEL_USB_AUDIO_OUTPUT_LEVEL:
|
||||
|
@ -1148,6 +1163,7 @@ static int ts590_set_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t val)
|
|||
{
|
||||
retval = ts590_set_ex_menu(rig, 72, 1, (int) val.f);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1175,6 +1191,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 37, 1, &value);
|
||||
}
|
||||
|
||||
val->i = value;
|
||||
break;
|
||||
|
||||
|
@ -1187,6 +1204,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 36, 1, &value);
|
||||
}
|
||||
|
||||
val->i = value;
|
||||
break;
|
||||
|
||||
|
@ -1199,6 +1217,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 31, 1, &value);
|
||||
}
|
||||
|
||||
val->i = value;
|
||||
break;
|
||||
|
||||
|
@ -1211,6 +1230,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 32, 1, &value);
|
||||
}
|
||||
|
||||
val->i = value;
|
||||
break;
|
||||
|
||||
|
@ -1223,6 +1243,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 33, 1, &value);
|
||||
}
|
||||
|
||||
val->i = value;
|
||||
break;
|
||||
|
||||
|
@ -1235,6 +1256,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 34, 1, &value);
|
||||
}
|
||||
|
||||
val->i = value;
|
||||
break;
|
||||
|
||||
|
@ -1247,6 +1269,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 5, 2, &value);
|
||||
}
|
||||
|
||||
val->f = value;
|
||||
break;
|
||||
|
||||
|
@ -1259,6 +1282,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 6, 2, &value);
|
||||
}
|
||||
|
||||
val->f = value;
|
||||
break;
|
||||
|
||||
|
@ -1271,6 +1295,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 73, 1, &value);
|
||||
}
|
||||
|
||||
val->f = value;
|
||||
break;
|
||||
|
||||
|
@ -1283,6 +1308,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 74, 1, &value);
|
||||
}
|
||||
|
||||
val->f = value;
|
||||
break;
|
||||
|
||||
|
@ -1295,6 +1321,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 71, 1, &value);
|
||||
}
|
||||
|
||||
val->f = value;
|
||||
break;
|
||||
|
||||
|
@ -1307,6 +1334,7 @@ static int ts590_get_ext_level(RIG *rig, vfo_t vfo, token_t token, value_t *val)
|
|||
{
|
||||
retval = ts590_get_ex_menu(rig, 72, 1, &value);
|
||||
}
|
||||
|
||||
val->f = value;
|
||||
break;
|
||||
|
||||
|
|
|
@ -366,14 +366,16 @@ int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
9, { { 0, -28.4f}, { 3, -26}, {11, -19.5f},
|
||||
{19, -13}, {27, -6.5f}, {35, 0},
|
||||
{48, 20}, {59, 40}, {70, 60}
|
||||
} };
|
||||
}
|
||||
};
|
||||
/* Meter Type 2 - IARU recommended */
|
||||
static cal_table_float_t meter_type2 =
|
||||
{
|
||||
9, { { 0, -54}, { 3, -48}, {11, -36},
|
||||
{19, -24}, {27, -12}, {35, 0},
|
||||
{48, 20}, {59, 40}, {70, 60}
|
||||
} };
|
||||
}
|
||||
};
|
||||
/* Find out which meter type is in use */
|
||||
retval = kenwood_safe_transaction(rig, "EX00011", ackbuf, sizeof(ackbuf), 11);
|
||||
|
||||
|
@ -381,6 +383,7 @@ int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
{
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (strncmp(ackbuf + 8, "000", 3) == 0)
|
||||
{
|
||||
table = &meter_type1;
|
||||
|
@ -395,7 +398,9 @@ int kenwood_ts890_get_level(RIG *rig, vfo_t vfo, setting_t level, value_t *val)
|
|||
__func__, ackbuf);
|
||||
return -RIG_EPROTO;
|
||||
}
|
||||
|
||||
retval = kenwood_safe_transaction(rig, "SM", ackbuf, 10, 6);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
|
|
|
@ -38,16 +38,25 @@ void serial_num(char *s)
|
|||
else { modem = "19200"; }
|
||||
|
||||
if (s[9] == '0')
|
||||
{
|
||||
diagnostics = "None";
|
||||
}
|
||||
else
|
||||
{
|
||||
diagnostics = "Non-Intrusive";
|
||||
}
|
||||
|
||||
if (s[10] == '1') { bandwidth = "12.5KHz"; }
|
||||
else { bandwidth = "25KHz"; }
|
||||
|
||||
if (s[14] == 'N')
|
||||
{
|
||||
agency = "N/A";
|
||||
}
|
||||
else
|
||||
{
|
||||
agency = "FCC/IC";
|
||||
}
|
||||
|
||||
/*
|
||||
/ 01234567890123456
|
||||
|
|
|
@ -623,7 +623,8 @@ static int ft817_cleanup(RIG *rig)
|
|||
static int ft817_open(RIG *rig)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: called \n", __func__);
|
||||
hl_usleep(1500*1000); // rig needs a bit to allow commands to come through on startup
|
||||
hl_usleep(1500 *
|
||||
1000); // rig needs a bit to allow commands to come through on startup
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
@ -705,7 +706,8 @@ static int ft817_read_eeprom(RIG *rig, unsigned short addr, unsigned char *out)
|
|||
*out = data[addr % 2];
|
||||
}
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: data[0]=%02x, data[1]=%02x, out=%02x\n", __func__, data[0], data[1], *out);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: data[0]=%02x, data[1]=%02x, out=%02x\n",
|
||||
__func__, data[0], data[1], *out);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
@ -1442,8 +1444,10 @@ static int ft817_set_vfo(RIG *rig, vfo_t vfo)
|
|||
{
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
retval = ft817_send_cmd(rig, FT817_NATIVE_CAT_SET_VFOAB);
|
||||
hl_usleep(50 * 1000); // can take a little while for vfo swap to happen -- otherwise we get errors trying to read eeprom to quickly
|
||||
hl_usleep(50 *
|
||||
1000); // can take a little while for vfo swap to happen -- otherwise we get errors trying to read eeprom to quickly
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -616,6 +616,7 @@ int ft857_get_vfo(RIG *rig, vfo_t *vfo)
|
|||
*vfo = rig->state.cache.vfo;
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
if (ft857_read_eeprom(rig, 0x0068, &c) < 0) /* get vfo status */
|
||||
{
|
||||
ignore = 1;
|
||||
|
|
|
@ -621,6 +621,7 @@ int newcat_open(RIG *rig)
|
|||
|
||||
retry_save = rig->state.rigport.retry;
|
||||
rig->state.rigport.retry = 0;
|
||||
|
||||
if (set_only)
|
||||
{
|
||||
err = newcat_set_cmd(rig);
|
||||
|
@ -629,6 +630,7 @@ int newcat_open(RIG *rig)
|
|||
{
|
||||
err = newcat_get_cmd(rig);
|
||||
}
|
||||
|
||||
rig->state.rigport.retry = retry_save;
|
||||
|
||||
if (err != RIG_OK)
|
||||
|
@ -10857,6 +10859,7 @@ int newcat_set_cmd_validate(RIG *rig)
|
|||
case RIG_MODEL_FTDX3000:
|
||||
strcpy(valcmd, ";");
|
||||
break;
|
||||
|
||||
// these models do not work with a single ;
|
||||
case RIG_MODEL_FT897:
|
||||
default:
|
||||
|
|
|
@ -46,7 +46,8 @@
|
|||
* (output) Number of bytes read.
|
||||
*/
|
||||
static int
|
||||
saebrtrack_transaction(ROT *rot, const char *cmdstr, char *data, size_t data_len)
|
||||
saebrtrack_transaction(ROT *rot, const char *cmdstr, char *data,
|
||||
size_t data_len)
|
||||
{
|
||||
struct rot_state *rs;
|
||||
int retval;
|
||||
|
@ -101,7 +102,8 @@ saebrtrack_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
|||
rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el);
|
||||
|
||||
/* Non Easycom standard */
|
||||
SNPRINTF(cmdstr, sizeof(cmdstr), "AZ%05.1f EL%05.1f UP000 XXX DN000 XXX\n", az, el);
|
||||
SNPRINTF(cmdstr, sizeof(cmdstr), "AZ%05.1f EL%05.1f UP000 XXX DN000 XXX\n", az,
|
||||
el);
|
||||
|
||||
retval = saebrtrack_transaction(rot, cmdstr, NULL, 0);
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ void frameParse(int fd, unsigned char *frame, int len)
|
|||
freqA = freq;
|
||||
printf("freq=%lf\n", freqA);
|
||||
break;
|
||||
|
||||
case 0x03:
|
||||
|
||||
//from_bcd(frameackbuf[2], (civ_731_mode ? 4 : 5) * 2);
|
||||
|
|
|
@ -107,6 +107,7 @@ again:
|
|||
switch (buf[0])
|
||||
{
|
||||
case '?': printf("Query %c\n", buf[1]); break;
|
||||
|
||||
case '*': printf("Set %c\n", buf[1]); break;
|
||||
|
||||
default: printf("Unknown cmd=%02x\n", buf[4]);
|
||||
|
|
|
@ -48,7 +48,8 @@ getmyline(int fd, char *buf)
|
|||
|
||||
while (read(fd, &c, 1) > 0)
|
||||
{
|
||||
if (c == 0x0d) return strlen(buf);
|
||||
if (c == 0x0d) { return strlen(buf); }
|
||||
|
||||
buf[i++] = c;
|
||||
}
|
||||
|
||||
|
|
|
@ -379,7 +379,8 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val)
|
|||
case TOK_HANDSHAKE:
|
||||
if (rs->rigport.type.rig != RIG_PORT_SERIAL)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: setting handshake is invalid for non-serial port rig type\n",
|
||||
rig_debug(RIG_DEBUG_ERR,
|
||||
"%s: setting handshake is invalid for non-serial port rig type\n",
|
||||
__func__);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -873,7 +874,8 @@ static int frontend_get_conf2(RIG *rig, token_t token, char *val, int val_len)
|
|||
case TOK_HANDSHAKE:
|
||||
if (rs->rigport.type.rig != RIG_PORT_SERIAL)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: getting handshake is invalid for non-serial port rig type\n",
|
||||
rig_debug(RIG_DEBUG_ERR,
|
||||
"%s: getting handshake is invalid for non-serial port rig type\n",
|
||||
__func__);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
@ -1295,7 +1297,8 @@ int HAMLIB_API rig_set_conf(RIG *rig, token_t token, const char *val)
|
|||
// Some parameters can be ignored
|
||||
if (token == TOK_HANDSHAKE && (rs->rigport.type.rig != RIG_PORT_SERIAL))
|
||||
{
|
||||
rig_debug(RIG_DEBUG_WARN, "%s: handshake is not valid for non-serial port rig\n", __func__);
|
||||
rig_debug(RIG_DEBUG_WARN,
|
||||
"%s: handshake is not valid for non-serial port rig\n", __func__);
|
||||
return RIG_OK; // this allows rigctld to continue and just print a warning instead of error
|
||||
}
|
||||
|
||||
|
|
|
@ -1284,6 +1284,7 @@ static int read_string_generic(hamlib_port_t *p,
|
|||
memset(rxbuffer, 0, rxmax);
|
||||
|
||||
int flag = 0; // we will allow one timeout
|
||||
|
||||
while (total_count < rxmax - 1) // allow 1 byte for end-of-string
|
||||
{
|
||||
ssize_t rd_count = 0;
|
||||
|
@ -1294,12 +1295,14 @@ static int read_string_generic(hamlib_port_t *p,
|
|||
if (result == -RIG_ETIMEOUT)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_CACHE, "%s: flag=%d\n", __func__, flag);
|
||||
|
||||
if (flag == 0)
|
||||
{
|
||||
flag = 1;
|
||||
hl_usleep(50 * 1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
// a timeout is a timeout no matter how many bytes
|
||||
//if (0 == total_count)
|
||||
{
|
||||
|
|
|
@ -974,10 +974,12 @@ int check_level_param(RIG *rig, setting_t level, value_t val, gran_t **gran)
|
|||
gran_t *this_gran;
|
||||
|
||||
this_gran = &rig->caps->level_gran[rig_setting2idx(level)];
|
||||
|
||||
if (gran)
|
||||
{
|
||||
*gran = this_gran;
|
||||
}
|
||||
|
||||
if (RIG_LEVEL_IS_FLOAT(level))
|
||||
{
|
||||
/* If min==max==0, all values are OK here but may be checked later */
|
||||
|
@ -985,6 +987,7 @@ int check_level_param(RIG *rig, setting_t level, value_t val, gran_t **gran)
|
|||
{
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
if (val.f < this_gran->min.f || val.f > this_gran->max.f)
|
||||
{
|
||||
return -RIG_EINVAL;
|
||||
|
@ -997,11 +1000,13 @@ int check_level_param(RIG *rig, setting_t level, value_t val, gran_t **gran)
|
|||
{
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
if (val.i < this_gran->min.i || val.i > this_gran->max.i)
|
||||
{
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -240,6 +240,7 @@ void *multicast_thread(void *vrig)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
|
@ -290,7 +291,8 @@ int multicast_init(RIG *rig, char *addr, int port)
|
|||
// Set the SO_REUSEADDR option to allow multiple processes to use the same address
|
||||
int optval = 1;
|
||||
|
||||
if (setsockopt(rig->state.multicast->sock, SOL_SOCKET, SO_REUSEADDR, (char*)&optval,
|
||||
if (setsockopt(rig->state.multicast->sock, SOL_SOCKET, SO_REUSEADDR,
|
||||
(char *)&optval,
|
||||
sizeof(optval)) < 0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: setsockopt: %s\n", __func__, strerror(errno));
|
||||
|
|
19
src/rig.c
19
src/rig.c
|
@ -509,7 +509,8 @@ RIG *HAMLIB_API rig_init(rig_model_t rig_model)
|
|||
return (NULL);
|
||||
}
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_model=%s %s %s\n", __func__, caps->mfg_name,
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: rig_model=%s %s %s\n", __func__,
|
||||
caps->mfg_name,
|
||||
caps->model_name, caps->version);
|
||||
|
||||
if (caps->hamlib_check_rig_caps != NULL)
|
||||
|
@ -1280,9 +1281,12 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
powerstat_t powerflag;
|
||||
status = rig_get_powerstat(rig, &powerflag);
|
||||
|
||||
if (status == RIG_OK && powerflag == RIG_POWER_OFF && rig->state.auto_power_on == 0)
|
||||
if (status == RIG_OK && powerflag == RIG_POWER_OFF
|
||||
&& rig->state.auto_power_on == 0)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_ERR, "%s: rig power is off, use --set-conf=auto_power_on=1 if power on is wanted\n", __func__);
|
||||
rig_debug(RIG_DEBUG_ERR,
|
||||
"%s: rig power is off, use --set-conf=auto_power_on=1 if power on is wanted\n",
|
||||
__func__);
|
||||
|
||||
return (-RIG_EPOWER);
|
||||
}
|
||||
|
@ -1781,8 +1785,9 @@ int HAMLIB_API rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s called vfo=%s, freq=%.0f\n", __func__,
|
||||
rig_strvfo(vfo), freq);
|
||||
#endif
|
||||
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) freq += rig->state.offset_vfoa;
|
||||
else if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) freq += rig->state.offset_vfob;
|
||||
|
||||
if (vfo == RIG_VFO_A || vfo == RIG_VFO_MAIN) { freq += rig->state.offset_vfoa; }
|
||||
else if (vfo == RIG_VFO_B || vfo == RIG_VFO_SUB) { freq += rig->state.offset_vfob; }
|
||||
|
||||
if (CHECK_RIG_ARG(rig))
|
||||
{
|
||||
|
@ -3469,6 +3474,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
|
|||
ELAPSED2;
|
||||
RETURNFUNC(retcode);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (strcmp(rs->pttport.pathname, rs->rigport.pathname)
|
||||
|
@ -3504,6 +3510,7 @@ int HAMLIB_API rig_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
|
|||
ELAPSED2;
|
||||
RETURNFUNC(retcode);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (strcmp(rs->pttport.pathname, rs->rigport.pathname)
|
||||
|
@ -6139,7 +6146,7 @@ int HAMLIB_API rig_get_powerstat(RIG *rig, powerstat_t *status)
|
|||
|
||||
if (retcode != RIG_OK) { *status = RIG_POWER_ON; } // if failed assume power is on
|
||||
|
||||
if (*status == RIG_POWER_OFF && rig->state.auto_power_on) rig->caps->set_powerstat(rig, RIG_POWER_ON);
|
||||
if (*status == RIG_POWER_OFF && rig->state.auto_power_on) { rig->caps->set_powerstat(rig, RIG_POWER_ON); }
|
||||
|
||||
RETURNFUNC(retcode);
|
||||
}
|
||||
|
|
|
@ -269,11 +269,16 @@ ROT *HAMLIB_API rot_init(rot_model_t rot_model)
|
|||
{
|
||||
case RIG_PORT_SERIAL:
|
||||
strncpy(rs->rotport.pathname, DEFAULT_SERIAL_PORT, HAMLIB_FILPATHLEN - 1);
|
||||
rs->rotport.parm.serial.rate = rs->rotport2.parm.serial.rate = caps->serial_rate_max; /* fastest ! */
|
||||
rs->rotport.parm.serial.data_bits = rs->rotport2.parm.serial.data_bits = caps->serial_data_bits;
|
||||
rs->rotport.parm.serial.stop_bits = rs->rotport2.parm.serial.stop_bits = caps->serial_stop_bits;
|
||||
rs->rotport.parm.serial.parity = rs->rotport2.parm.serial.parity = caps->serial_parity;
|
||||
rs->rotport.parm.serial.handshake = rs->rotport2.parm.serial.handshake = caps->serial_handshake;
|
||||
rs->rotport.parm.serial.rate = rs->rotport2.parm.serial.rate =
|
||||
caps->serial_rate_max; /* fastest ! */
|
||||
rs->rotport.parm.serial.data_bits = rs->rotport2.parm.serial.data_bits =
|
||||
caps->serial_data_bits;
|
||||
rs->rotport.parm.serial.stop_bits = rs->rotport2.parm.serial.stop_bits =
|
||||
caps->serial_stop_bits;
|
||||
rs->rotport.parm.serial.parity = rs->rotport2.parm.serial.parity =
|
||||
caps->serial_parity;
|
||||
rs->rotport.parm.serial.handshake = rs->rotport2.parm.serial.handshake =
|
||||
caps->serial_handshake;
|
||||
break;
|
||||
|
||||
case RIG_PORT_PARALLEL:
|
||||
|
@ -389,6 +394,7 @@ int HAMLIB_API rot_open(ROT *rot)
|
|||
rs->rotport.pathname);
|
||||
rs->rotport.type.rig = RIG_PORT_NETWORK;
|
||||
}
|
||||
|
||||
if (sscanf(rs->rotport2.pathname, "%d.%d.%d.%d:%d", &net1, &net2, &net3, &net4,
|
||||
&port) == 5)
|
||||
{
|
||||
|
|
|
@ -795,7 +795,8 @@ int HAMLIB_API serial_flush(hamlib_port_t *p)
|
|||
|
||||
p->timeout = timeout_save;
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "tcflush%s\n", "");
|
||||
tcflush(p->fd, TCIFLUSH); // we also do this flush https://github.com/Hamlib/Hamlib/issues/1241
|
||||
tcflush(p->fd,
|
||||
TCIFLUSH); // we also do this flush https://github.com/Hamlib/Hamlib/issues/1241
|
||||
return (RIG_OK);
|
||||
}
|
||||
|
||||
|
|
|
@ -1479,6 +1479,7 @@ void usage_amp(FILE *fout)
|
|||
{
|
||||
nbspaces -= fprintf(fout, ", %s", test_list[i].arg4);
|
||||
}
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: nbspace left=%d\n", __func__, nbspaces);
|
||||
|
||||
fprintf(fout, ")\n");
|
||||
|
|
|
@ -958,6 +958,7 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc,
|
|||
{
|
||||
*nl = '\0'; /* chomp */
|
||||
}
|
||||
|
||||
/* skip a space arg if first arg...happens parsing rigctld commands */
|
||||
{
|
||||
p1 = arg1[0] == ' ' ? arg1 + 1 : arg1;
|
||||
|
@ -2048,6 +2049,7 @@ int set_conf(RIG *my_rig, char *conf_parms)
|
|||
}
|
||||
|
||||
token = rig_token_lookup(my_rig, p);
|
||||
|
||||
if (token != 0)
|
||||
{
|
||||
ret = rig_set_conf(my_rig, rig_token_lookup(my_rig, p), q);
|
||||
|
|
|
@ -1324,7 +1324,8 @@ void *handle_socket(void *arg)
|
|||
else
|
||||
{
|
||||
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: reply(%d bytes)='%s'\n", __func__, retcode, reply);
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: reply(%d bytes)='%s'\n", __func__, retcode,
|
||||
reply);
|
||||
fwrite(reply, 1, retcode, fsockout);
|
||||
fflush(fsockout);
|
||||
}
|
||||
|
|
|
@ -356,8 +356,11 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
/* FIXME: bound checking and port type == serial */
|
||||
my_rot->state.rotport2.parm.serial.rate = my_rot->state.rotport2.parm.serial.rate;
|
||||
my_rot->state.rotport2.parm.serial.data_bits = my_rot->state.rotport2.parm.serial.data_bits;
|
||||
my_rot->state.rotport2.parm.serial.rate =
|
||||
my_rot->state.rotport2.parm.serial.rate;
|
||||
my_rot->state.rotport2.parm.serial.data_bits =
|
||||
my_rot->state.rotport2.parm.serial.data_bits;
|
||||
|
||||
if (serial_rate != 0)
|
||||
{
|
||||
my_rot->state.rotport.parm.serial.rate = serial_rate;
|
||||
|
|
|
@ -78,7 +78,8 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
char val[256];
|
||||
retcode = rig_get_conf2(my_rig, rig_token_lookup(my_rig, "write_delay"), val, sizeof(val));
|
||||
retcode = rig_get_conf2(my_rig, rig_token_lookup(my_rig, "write_delay"), val,
|
||||
sizeof(val));
|
||||
printf("write_delay=%s\n", val);
|
||||
|
||||
// printf("Port %s opened ok\n", SERIAL_PORT);
|
||||
|
|
Ładowanie…
Reference in New Issue