From 0ac0d4911aab6f0517ffe9ceb4bcdc5770169851 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Thu, 25 Jun 2020 23:20:55 -0500 Subject: [PATCH] Remove cache from FT-817 get_freq -- comments indicate 2 consistent reads are needed for some reason https://github.com/Hamlib/Hamlib/issues/329 --- rigs/yaesu/ft817.c | 13 +++++++------ rigs/yaesu/ft817.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/rigs/yaesu/ft817.c b/rigs/yaesu/ft817.c index b1a879312..ce750356e 100644 --- a/rigs/yaesu/ft817.c +++ b/rigs/yaesu/ft817.c @@ -164,7 +164,7 @@ const struct rig_caps ft817_caps = RIG_MODEL(RIG_MODEL_FT817), .model_name = "FT-817", .mfg_name = "Yaesu", - .version = "20200616.0", + .version = "20200625.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -495,14 +495,15 @@ int ft817_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) while ((f1 == 0 || f1 != f2) && retries-- > 0) { - if (check_cache_timeout(&p->fm_status_tv)) - if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS)) < 0) - { - return n; - } + rig_debug(RIG_DEBUG_TRACE, "%s: retries=%d\n", __func__, retries); + if ((n = ft817_get_status(rig, FT817_NATIVE_CAT_GET_FREQ_MODE_STATUS)) < 0) + { + return n; + } f1 = f2; f2 = from_bcd_be(p->fm_status, 8); + dump_hex(p->fm_status, 5); } if (retries >= 0) diff --git a/rigs/yaesu/ft817.h b/rigs/yaesu/ft817.h index 5aa5ce936..aaaf293a7 100644 --- a/rigs/yaesu/ft817.h +++ b/rigs/yaesu/ft817.h @@ -113,7 +113,7 @@ enum ft817_native_cmd_e { FT817_NATIVE_CAT_PWR_WAKE, FT817_NATIVE_CAT_PWR_ON, FT817_NATIVE_CAT_PWR_OFF, - FT817_NATIVE_CAT_EEPROM_READ, + FT817_NATIVE_CAT_EEPROM_READ, FT817_NATIVE_SIZE /* end marker */ };