kopia lustrzana https://github.com/Hamlib/Hamlib
Merge branch 'master' into remove_bashisms
commit
5854114220
|
@ -539,9 +539,17 @@ static int netrigctl_open(RIG *rig)
|
|||
}
|
||||
else if (strcmp(setting, "ptt_type") == 0)
|
||||
{
|
||||
rig->caps->ptt_type = strtol(value, NULL, 0);
|
||||
rig->state.pttport.type.ptt = rig->caps->ptt_type;
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting, rig->caps->ptt_type);
|
||||
ptt_type_t temp = (ptt_type_t)strtol(value, NULL, 0);
|
||||
if (RIG_PTT_RIG_MICDATA == rig->state.pttport.type.ptt && RIG_PTT_NONE == temp)
|
||||
{
|
||||
/*
|
||||
* remote PTT must always be RIG_PTT_RIG_MICDATA
|
||||
* if there is any PTT capability and we have not
|
||||
* locally overridden it
|
||||
*/
|
||||
rig->state.pttport.type.ptt = temp;
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: %s set to %d\n", __func__, setting, rig->state.pttport.type.ptt);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1128,6 +1128,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0 // does not work with rigs without VFO_A
|
||||
if (vfo == RIG_VFO_CURR)
|
||||
{
|
||||
vfo = priv->curr_vfo;
|
||||
|
@ -1135,6 +1136,7 @@ int icom_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
rig_debug(RIG_DEBUG_VERBOSE, "%s: CurrVFO changed to %s\n", __func__,
|
||||
rig_strvfo(vfo));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
retval = set_vfo_curr(rig, vfo, priv->curr_vfo);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#define BACKEND_VER "20200525"
|
||||
#define BACKEND_VER "20200601"
|
||||
|
||||
/*
|
||||
* defines used by comp_cal_str in rig.c
|
||||
|
|
|
@ -1375,6 +1375,7 @@ int kenwood_get_vfo_if(RIG *rig, vfo_t *vfo)
|
|||
{
|
||||
case '0':
|
||||
*vfo = priv->tx_vfo = split_and_transmitting ? RIG_VFO_B : RIG_VFO_A;
|
||||
if (priv->info[32] == '1') priv->tx_vfo = RIG_VFO_B;
|
||||
break;
|
||||
|
||||
case '1':
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <string.h>
|
||||
#include "token.h"
|
||||
|
||||
#define BACKEND_VER "20200528"
|
||||
#define BACKEND_VER "20200601"
|
||||
|
||||
#define EOM_KEN ';'
|
||||
#define EOM_TH '\r'
|
||||
|
|
|
@ -169,7 +169,6 @@ transaction_quit:
|
|||
static int
|
||||
gs232b_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
||||
{
|
||||
char buf[32];
|
||||
char cmdstr[64];
|
||||
int retval;
|
||||
unsigned u_az, u_el;
|
||||
|
@ -186,12 +185,16 @@ gs232b_rot_set_position(ROT *rot, azimuth_t az, elevation_t el)
|
|||
u_el = (unsigned) rint(el);
|
||||
|
||||
sprintf(cmdstr, "W%03u %03u" EOM, u_az, u_el);
|
||||
#if 0 // do any GS232B models need a reply to the W command?
|
||||
retval = gs232b_transaction(rot, cmdstr, buf, sizeof(buf), 0);
|
||||
#else
|
||||
retval = gs232b_transaction(rot, cmdstr, NULL, 0 , 0);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
}
|
||||
#endif
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
@ -317,7 +320,7 @@ const struct rot_caps gs232b_rot_caps =
|
|||
ROT_MODEL(ROT_MODEL_GS232B),
|
||||
.model_name = "GS-232B",
|
||||
.mfg_name = "Yaesu",
|
||||
.version = "20200517",
|
||||
.version = "20200531",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_STABLE,
|
||||
.rot_type = ROT_TYPE_OTHER,
|
||||
|
|
14
src/rig.c
14
src/rig.c
|
@ -194,13 +194,12 @@ static vfo_t vfo_fixup(RIG *rig, vfo_t vfo)
|
|||
{
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: vfo=%s\n", __func__, rig_strvfo(vfo));
|
||||
|
||||
#if 0 // Icoms require VFO_CURR -- 2020-05-30 -- if no other problems
|
||||
// reported after WSJT-X is released delete this
|
||||
if (vfo == RIG_VFO_CURR && rig->state.current_vfo == RIG_VFO_CURR)
|
||||
if (vfo == RIG_VFO_CURR)
|
||||
{
|
||||
vfo = RIG_VFO_A;
|
||||
rig_debug(RIG_DEBUG_TRACE, "%s: Leaving currVFO alone\n", __func__);
|
||||
return vfo; // don't modify vfo for RIG_VFO_CURR
|
||||
}
|
||||
#endif
|
||||
|
||||
if (vfo == RIG_VFO_RX)
|
||||
{
|
||||
vfo = RIG_VFO_A;
|
||||
|
@ -926,6 +925,11 @@ int HAMLIB_API rig_open(RIG *rig)
|
|||
{
|
||||
rs->tx_vfo = rs->current_vfo;
|
||||
}
|
||||
else // vfo fails so set some sensible defaults
|
||||
{
|
||||
rs->current_vfo = RIG_VFO_CURR;
|
||||
rs->tx_vfo = RIG_VFO_TX;
|
||||
}
|
||||
|
||||
// try to turn off the screensaver if possible
|
||||
// don't care about the return here...it's just a nice-to-have
|
||||
|
|
|
@ -4080,7 +4080,7 @@ declare_proto_rig(dump_state)
|
|||
// protocol 1 fields can be multi-line -- just write the thing to allow for it
|
||||
// backward compatible as new values will just generate warnings
|
||||
fprintf(fout, "vfo_ops=0x%x\n", rig->caps->vfo_ops);
|
||||
fprintf(fout, "ptt_type=0x%x\n", rig->caps->ptt_type);
|
||||
fprintf(fout, "ptt_type=0x%x\n", rig->state.pttport.type.ptt);
|
||||
fprintf(fout, "done\n");
|
||||
|
||||
#if 0 // why isn't this implemented? Does anybody care?
|
||||
|
|
|
@ -704,6 +704,7 @@ static int write_block2(void *func,
|
|||
*/
|
||||
static int handle_ts2000(void *arg)
|
||||
{
|
||||
rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd=%s\n", __func__, (char*)arg);
|
||||
// Handle all the queries
|
||||
if (strcmp(arg, "ID;") == 0)
|
||||
{
|
||||
|
@ -752,15 +753,16 @@ static int handle_ts2000(void *arg)
|
|||
return retval;
|
||||
}
|
||||
|
||||
if (ptt)
|
||||
// we need to know split status -- don't care about the vfo
|
||||
retval = rig_get_split_vfo(my_rig, RIG_VFO_CURR, &split, &vfo);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
retval = rig_get_split_vfo(my_rig, RIG_VFO_CURR, &split, &vfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
retval = rig_get_vfo(my_rig, &vfo);
|
||||
return retval;
|
||||
}
|
||||
|
||||
retval = rig_get_vfo(my_rig, &vfo);
|
||||
|
||||
if (retval != RIG_OK)
|
||||
{
|
||||
return retval;
|
||||
|
|
|
@ -571,6 +571,11 @@ int main(int argc, char *argv[])
|
|||
/*
|
||||
* ex: RIG_PTT_PARALLEL and /dev/parport0
|
||||
*/
|
||||
if (ptt_type != RIG_PTT_NONE)
|
||||
{
|
||||
my_rig->state.pttport.type.ptt = ptt_type;
|
||||
}
|
||||
|
||||
if (dcd_type != RIG_DCD_NONE)
|
||||
{
|
||||
my_rig->state.dcdport.type.dcd = dcd_type;
|
||||
|
@ -625,12 +630,6 @@ int main(int argc, char *argv[])
|
|||
exit(2);
|
||||
}
|
||||
|
||||
if (ptt_type != RIG_PTT_NONE)
|
||||
{
|
||||
my_rig->state.pttport.type.ptt = ptt_type;
|
||||
my_rig->caps->ptt_type = ptt_type;
|
||||
}
|
||||
|
||||
if (verbose > RIG_DEBUG_ERR)
|
||||
{
|
||||
printf("Opened rig model %u, '%s'\n",
|
||||
|
|
Ładowanie…
Reference in New Issue