diff --git a/dummy/netrigctl.c b/dummy/netrigctl.c index 4acb59786..52df37c68 100644 --- a/dummy/netrigctl.c +++ b/dummy/netrigctl.c @@ -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 { diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index a448db277..65ca20ee1 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -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); diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index 4bdfef0c6..6c4dd84c8 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -31,7 +31,7 @@ #include #endif -#define BACKEND_VER "20200525" +#define BACKEND_VER "20200601" /* * defines used by comp_cal_str in rig.c diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 6e0bcc8ec..39f1a6ffb 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.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': diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index 5a91ed8be..bccf8ebb7 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -27,7 +27,7 @@ #include #include "token.h" -#define BACKEND_VER "20200528" +#define BACKEND_VER "20200601" #define EOM_KEN ';' #define EOM_TH '\r' diff --git a/rotators/gs232a/gs232b.c b/rotators/gs232a/gs232b.c index 0582b840d..dc7822568 100644 --- a/rotators/gs232a/gs232b.c +++ b/rotators/gs232a/gs232b.c @@ -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, diff --git a/src/rig.c b/src/rig.c index 620a97d7b..5380969c5 100644 --- a/src/rig.c +++ b/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 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index c4916f9f9..d89985aa8 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -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? diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index 928ab2d64..93bd633ee 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -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; diff --git a/tests/rigctld.c b/tests/rigctld.c index e68b7a331..b5f09cbd6 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -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",