From 79492d42844b4bcbe8f7e1f5b374960311b4e7c6 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Tue, 23 May 2023 10:11:51 -0500 Subject: [PATCH] Put enter/leave CAT in FT767GX.c again and reduce write_delay to zero. Hopefully speeds things up and still works but may need to tweak write_delay https://github.com/Hamlib/Hamlib/issues/1300 --- rigs/yaesu/ft767gx.c | 32 +------------------------------- rigs/yaesu/ft767gx.h | 2 +- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/rigs/yaesu/ft767gx.c b/rigs/yaesu/ft767gx.c index c51318ce8..d8c60c0a2 100644 --- a/rigs/yaesu/ft767gx.c +++ b/rigs/yaesu/ft767gx.c @@ -259,7 +259,7 @@ const struct rig_caps ft767gx_caps = RIG_MODEL(RIG_MODEL_FT767), .model_name = "FT-767GX", .mfg_name = "Yaesu", - .version = "20230522.0", + .version = "20230523.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -468,7 +468,6 @@ int ft767_open(RIG *rig) return retval; } -#if 0 // we should be able to leave CAT on and just turn off on close retval = ft767_leave_CAT(rig); if (retval < 0) @@ -477,7 +476,6 @@ int ft767_open(RIG *rig) memset(priv->update_data, 0, FT767GX_STATUS_UPDATE_DATA_LENGTH); return retval; } -#endif rig->state.vfo_list = RIG_VFO_A | RIG_VFO_B; return RIG_OK; @@ -514,7 +512,6 @@ int ft767_set_freq(RIG *rig, vfo_t vfo, freq_t freq) /* fill in first four bytes */ to_bcd(cmd, freq / 10, 8); -#if 0 retval = ft767_enter_CAT(rig); if (retval < 0) @@ -522,7 +519,6 @@ int ft767_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_debug(RIG_DEBUG_ERR, "%s: enter_CAT %d\n", __func__, retval); return retval; } -#endif retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH); @@ -533,14 +529,12 @@ int ft767_set_freq(RIG *rig, vfo_t vfo, freq_t freq) return retval; } -#if 0 retval = ft767_leave_CAT(rig); if (retval < 0) { rig_debug(RIG_DEBUG_ERR, "%s: leave_CAT %d\n", __func__, retval); } -#endif return retval; } @@ -553,7 +547,6 @@ int ft767_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) /* fill in p1 */ cmd[3] = mode2rig(rig, mode); -#if 0 retval = ft767_enter_CAT(rig); if (retval < 0) @@ -561,7 +554,6 @@ int ft767_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) rig_debug(RIG_DEBUG_ERR, "%s: enter_CAT %d\n", __func__, retval); return retval; } -#endif retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH); @@ -572,14 +564,12 @@ int ft767_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) return retval; } -#if 0 retval = ft767_leave_CAT(rig); if (retval < 0) { rig_debug(RIG_DEBUG_ERR, "%s: leave_CAT %d\n", __func__, retval); } -#endif return retval; } @@ -690,7 +680,6 @@ int ft767_set_vfo(RIG *rig, vfo_t vfo) priv->current_vfo = vfo; -#if 0 retval = ft767_enter_CAT(rig); if (retval < 0) @@ -698,7 +687,6 @@ int ft767_set_vfo(RIG *rig, vfo_t vfo) rig_debug(RIG_DEBUG_ERR, "%s: enter_CAT %d\n", __func__, retval); return retval; } -#endif retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH); @@ -709,14 +697,12 @@ int ft767_set_vfo(RIG *rig, vfo_t vfo) return retval; } -#if 0 retval = ft767_leave_CAT(rig); if (retval < 0) { rig_debug(RIG_DEBUG_ERR, "%s: leave_CAT %d\n", __func__, retval); } -#endif return retval; } @@ -781,7 +767,6 @@ int ft767_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) /* cmd[3] = tone2rig(rig, tone); */ -#if 0 retval = ft767_enter_CAT(rig); if (retval < 0) @@ -789,7 +774,6 @@ int ft767_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) rig_debug(RIG_DEBUG_ERR, "%s: enter_CAT %d\n", __func__, retval); return retval; } -#endif retval = ft767_send_block_and_ack(rig, cmd, YAESU_CMD_LENGTH); @@ -800,14 +784,12 @@ int ft767_set_ctcss_tone(RIG *rig, vfo_t vfo, tone_t tone) return retval; } -#if 0 retval = ft767_leave_CAT(rig); if (retval < 0) { rig_debug(RIG_DEBUG_ERR, "%s: leave_CAT %d\n", __func__, retval); } -#endif return retval; } @@ -903,7 +885,6 @@ int ft767_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) /* fill in first four bytes */ to_bcd(freq_cmd, tx_freq / 10, 8); -#if 0 retval = ft767_enter_CAT(rig); if (retval < 0) @@ -911,7 +892,6 @@ int ft767_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) rig_debug(RIG_DEBUG_ERR, "%s: enter_CAT %d\n", __func__, retval); return retval; } -#endif /* change to the xmit VFO */ vfo_cmd[3] = vfo2rig(rig, change_vfo); @@ -945,14 +925,12 @@ int ft767_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq) return retval; } -#if 0 retval = ft767_leave_CAT(rig); if (retval < 0) { rig_debug(RIG_DEBUG_ERR, "%s: leave_CAT %d\n", __func__, retval); } -#endif return RIG_OK; } @@ -1070,7 +1048,6 @@ int ft767_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, /* fill in p1 */ mode_cmd[3] = mode2rig(rig, tx_mode); -#if 0 retval = ft767_enter_CAT(rig); if (retval < 0) @@ -1078,7 +1055,6 @@ int ft767_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, rig_debug(RIG_DEBUG_ERR, "%s: enter_CAT %d\n", __func__, retval); return retval; } -#endif /* change to the xmit VFO */ vfo_cmd[3] = vfo2rig(rig, change_vfo); @@ -1112,14 +1088,12 @@ int ft767_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode, return retval; } -#if 0 retval = ft767_leave_CAT(rig); if (retval < 0) { rig_debug(RIG_DEBUG_ERR, "%s: leave_CAT %d\n", __func__, retval); } -#endif return RIG_OK; } @@ -1259,7 +1233,6 @@ int ft767_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) rig_flush(&rig->state.rigport); -#if 0 retval = ft767_enter_CAT(rig); if (retval < 0) @@ -1267,7 +1240,6 @@ int ft767_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) rig_debug(RIG_DEBUG_ERR, "%s: enter_CAT %d\n", __func__, retval); return retval; } -#endif /* See whether we need to toggle the split state */ curr_split = priv->update_data[STATUS_FLAGS] & STATUS_MASK_SPLIT; @@ -1318,7 +1290,6 @@ int ft767_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) } } -#if 0 retval = ft767_leave_CAT(rig); if (retval < 0) @@ -1326,7 +1297,6 @@ int ft767_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t tx_vfo) rig_debug(RIG_DEBUG_ERR, "%s: leave_CAT %d\n", __func__, retval); return retval; } -#endif break; diff --git a/rigs/yaesu/ft767gx.h b/rigs/yaesu/ft767gx.h index b9fe60c5b..a60f1eb6d 100644 --- a/rigs/yaesu/ft767gx.h +++ b/rigs/yaesu/ft767gx.h @@ -32,7 +32,7 @@ #define FT767GX_PACING_INTERVAL 5 #define FT767GX_PACING_DEFAULT_VALUE 0 -#define FT767GX_WRITE_DELAY 50 +#define FT767GX_WRITE_DELAY 0 /* Sequential fast writes confuse my FT767GX without this delay */